You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handling long running operation in VisualizerObjectSource #325
I tried to implement a solution according to Work with large and complex objects but in my case I can't break down plan retrieval into smaller actions. Instead, my idea was to start a long running task with Task.Run and call RequestDataAsync until the task is finished. But this approach doesn't work either because when VS is in break mode it doesn't run other threads so I get: StreamJsonRpc.RemoteInvocationException: cannot evaluate expression since the function evaluation requires all threads to run.
Is there any way to tell VS to run my task or is there some other way to execute long running operation without causing timeout from VS?
Reacted by Lance Craig, imsh, Danilo Casa, Muhammad Umair Irshad, Christoph Fink, Jamie Lord, Ardit Mezini, Marco, Andrii Kovtun, Giorgi Dalakishvili and 5 more
Hello Giorgi Dalakishvili (@Giorgi), sadly that is a limitation that the debugger enforces to every evaluation that happens within the debugger. In the case of visualizers, no evaluation can take more than 5 seconds. I will see if there is anything that can be done to make your visualizer work and then get back to you. Thanks!
Yes, I understand that there is a 5-second limit for the RequestDataAsync but I could call it in a loop if there was a way to use Task.Run inside debuggee without getting StreamJsonRpc.RemoteInvocationException
Hello @Giorgi, sadly that is a limitation that the debugger enforces to every evaluation that happens within the debugger. In the case of visualizers, no evaluation can take more than 5 seconds. I will see if there is anything that can be done to make your visualizer work and then get back to you. Thanks!
Giorgi Dalakishvili (@Giorgi), something you can do is move the visualizer's logic to a library, and have users explicitly call a ComputeQueryPlan(Async) method, if the IQueryable<> visualizer causes them timeouts. The methods will return a custom object that you can still visualize like before. Users will have to change their code and install a NuGet package, but only as a fallback if they are getting timeouts.
Activity
mpeyrotc commentedon Feb 29, 2024
Hello Giorgi Dalakishvili (@Giorgi), sadly that is a limitation that the debugger enforces to every evaluation that happens within the debugger. In the case of visualizers, no evaluation can take more than 5 seconds. I will see if there is anything that can be done to make your visualizer work and then get back to you. Thanks!
Giorgi commentedon Feb 29, 2024
Yes, I understand that there is a 5-second limit for the
RequestDataAsyncbut I could call it in a loop if there was a way to useTask.Runinside debuggee without gettingStreamJsonRpc.RemoteInvocationExceptionElectricVampire commentedon Jun 18, 2025
Any solutions for this problem?
teo-tsirpanis commentedon Aug 28, 2025
Giorgi Dalakishvili (@Giorgi), something you can do is move the visualizer's logic to a library, and have users explicitly call a
ComputeQueryPlan(Async)method, if theIQueryable<>visualizer causes them timeouts. The methods will return a custom object that you can still visualize like before. Users will have to change their code and install a NuGet package, but only as a fallback if they are getting timeouts.