microsoft / vscode-mono-debug

A simple VS Code debug adapter for mono
Other
159 stars 173 forks source link

Breakpoints pause the debugger but cannot step through code VS Code 1.9 and Mono 4.8 #21

Closed buonan closed 7 years ago

buonan commented 7 years ago

Ubuntu 16.04 I upgraded to VS Code 1.9 and now the breakpoints pause in the debugger but I cannot step through the code.

tengxianbing commented 7 years ago

I seem meet the same issue. I use VS Code 1.9.1, mono 4.8 and Mono Debug 0.15.3. I build a C# project. It should be work fine, but it seems can't Step Into(F11) when the program running into a event callback. (Actually, the project is c++ project, I use swig to convert to c# api, then I write a c# demo to debug.)

borgdylan commented 7 years ago

The same happens with Xamarin Android projects and normal desktop projects when it comes to debugging threads.

borgdylan commented 7 years ago

@weinand I tried rebuilding the extension with the latest nuget packages for debugger-libs. The bug is still present.

borgdylan commented 7 years ago

Debugging xamarin apps with this is getting worse. This extension better get some love before it becomes useless. Also why are jetbrains building the packages and with what patches?

AutonomicCoder commented 7 years ago

@weinand We're having the same problem here.

I can set a breakpoint at the top of the console app as well as step in and over,

screen shot 2017-04-11 at 6 18 21 pm

screen shot 2017-04-11 at 6 19 46 pm

however once that continues and I hit a breakpoint on another thread the call stack shows the thread paused on a breakpoint but the Line numbers seem to be disconnected.

screen shot 2017-04-11 at 6 21 23 pm

Anything I can do to help get this resolved ? Perhaps some logging from the debug extension ?

borgdylan commented 7 years ago

@AutonomicCoder did you reproduce the issue on the latest insiders build? If no I will try to test again to see if it is still present.

@weinand Did you have any chance to see what is going wrong when debugging threads? Should we bring in some dev from xamarin in to the issue. I am not understanding why this is happening.

AutonomicCoder commented 7 years ago

@borgdylan My original test was with 1.11.1.

I tested again and was able to reproduce this on

Visual Studio Code
Version 1.12.0-insider (1.12.0-insider)
a5e9d3b5e8e7e9a89dd6624a70aab031f189a6fa

If you're looking to get someone from xamarin involved perhaps my friend @directhex can assist with finding the right guy.

weinand commented 7 years ago

@borgdylan Sorry, but at the moment I do not have any cycles to look into the open issues. I created mono-debug on a 2 day hackathon and try to maintain it in my sparetime since then. My real focus is the VS Code debugger architecture (and node-debug).

Since mono-debug is OSS, feel free to submit PRs.

AutonomicCoder commented 7 years ago

@borgdylan, @weinand ... I've got this fixed on my dev machine. It has to do with the stackTrace response when there's no code in context ( inside System.Reflection.MonoMethod.Invoke for example ).

Gotta run so PR to follow tonight or early tomorrow EDT.

weinand commented 7 years ago

@AutonomicCoder Great to hear! I hope to find some time on the long (Easter) weekend to try your fix and release a new version of mono-debug.

weinand commented 7 years ago

@AutonomicCoder I've published mono-debug v0.15.5 with your fix (PR https://github.com/Microsoft/vscode-mono-debug/pull/28). Thanks!

weinand commented 7 years ago

(I'm sitting in a train and my connection is a bit flaky...)