Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger:Breakpoints hit the wrong line after editing. #496

Closed
Serena01 opened this issue Jun 29, 2016 · 2 comments
Closed

Debugger:Breakpoints hit the wrong line after editing. #496

Serena01 opened this issue Jun 29, 2016 · 2 comments

Comments

@Serena01
Copy link

Environment data

dotnet --info output:
VS Code version:1.2.1
C# Extension version:1.1.7

Steps to reproduce

1.Download and launch the sample project from https://github.com/OmniSharp/omnisharp-vscode/files/336372/musicstore.zip
2.Select ".NET Core Launch Web" and configure the location of musicstore.dll for "program which contains the space at the end as following: "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/musicstore.dll ",
3.Add some simple code in HomeController.cs, then set bp as bellow:
HomeController(IOptions options){
int a=1;//set breakpiont1 here
int b=20;
int c=a+1;//set breakpoint2 here
}
4.F5
5.When VS code hit breakpoint1, press "Enter".
6.F5

Expected behavior

1.Both breakpoints should be red.
2.Breakpoint2 should be at line which contains "int c=a+b"
3.VS code should hit the line which contains "int c=a+b"

Actual behavior

1.Both breakpoints should be grey.
2.Breakpoint2 is not at line which contains "int c=a+b"
3.VS code did not hit the line which contains "int c=a+b"
please see the before_enter.png ,after_enter.png and Twice_F5.png

before_enter
after_enter
twice_f5

@wesrupert
Copy link
Contributor

VS Code currently does not let us know when the buffer has been modified, so we don't know that these breakpoints shouldn't be bound to the now-stale source information. VS Code issue #8077 should enable detecting this, then we can disable stale breakpoints.

@wesrupert
Copy link
Contributor

Fix should be available in the next release to address breakpoints binding to the wrong location after saving. We don't get any information from VS Code about a modified buffer currently, I've filed VS Code issue #9823 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants