Closed LwServices closed 3 years ago
The debugger just writes to Visual Studio's Output (Debug) pane:
Please let me know what you find. The extension should write the stdout/stderr output from the dotnet publish
operation to the output pane when the tool returns a non-zero exit code.
I did just notice that projects in solution folders still aren't working and I'll have a look at that.
I'm poking around on this and am seeing some odd behavior. On my machine this this mostly works but occasionally doesn't. I'm going to investigate further, This has the feel of a cross-threading problem, but we'll see...
I might be narrowing this down a bit. This seems to be a problem while Visual Studio is executing background tasks just after being launched. I'm seeing three different behaviors:
If you click the Start debugging button as soon as it appears after launching Visual Studio, I generally see the project being launched locally on the development workstation (not on the Raspberry). The root cause here is that Visual Studio is loading extensions asynchronously and the Raspberry Debugger extension hasn't been loaded yet so it can't intercept the run command.
If I wait a bit after launching Visual Studio and opening the solution and start debugging after our extension has been loaded but before Visual Studio reports that the projects are loaded and ready, I see System.AccessViolationException exceptions.
If I wait for Visual Studio to complete all of its background tasks after launching, Raspberry debugging seems to work every time.
These might be of some help:
https://docs.microsoft.com/en-us/visualstudio/extensibility/managing-project-loading-in-a-solution?view=vs-2019 https://www.visualstudiogeeks.com/blog/visual%20studio%20extensibility/how-to-monitor-solution-events-in-vs-extensions https://devblogs.microsoft.com/visualstudio/async-loaded-net-projects-may-impact-visual-studio-extensions/
It looks like this is fixed. I was able to reproduce this consistently by:
I'd see various bad things happen here, including:
I resolved this by ensuring that the projects are fully loaded within our DebugStartCommand
via the SVsSolution.EnsureProjectIsLoaded()
service method. After this change, I'm unable to reproduce the problem by following the steps above.
FIXED for v1.1
After update to 0.6 try to verify changes. Now its look like this Extension don't work at all.
I already tried to -different Project (what worked yesterday) -clean solution -restart visual studio / pc
How I can enable the log for RaspberryDebugger? Where is the log located?