dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 671 forks source link

Debugger:It should not hit the breakpoint twice #1422

Open qian6 opened 7 years ago

qian6 commented 7 years ago

Environment data

dotnet --info output:

OS: LinuxMint 17 VS Code version: v1.11.2 C# Extension version:1.9.0

Steps to reproduce

  1. Execute the following command to create a dotnet project dotnet new mvc -o web cd web dotnet restore dotnet run
  2. Open web project in vscode.
  3. Set a breakpoint at line of 2 in Index.cshtml file.
  4. Press F5(It hit this bp).
  5. Press F5

Expected behavior

It should in running mode and display UI

Actual behavior

It hit this breakpoint again.

Log:log.txt

gregg-miskelly commented 7 years ago

@qian6 this is almost certainly because the web browser is hitting the web page twice. Do you have a restored tab open? If not, can you a Debug.WriteLine statement at that line and confirm the code just is invoked more than once?

GraceDong commented 7 years ago

I tried to reproduce this issue again, and I found the web browser is not loaded when first hit the breakpoint. The web browser is loaded and hit the breakpoint again after above steps #5.