Run Debug stalls after build task
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Command Line Tools (2.0.3)
Product Information:
Version: 2.0.3
Commit SHA-1 hash: eb1d5ee318
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.3/
Microsoft .NET Core Shared Framework Host
Version : 2.0.3
Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
VS Code version: 1.18.1 C# Extension version: 1.13.1
Steps to reproduce
dotnet new console -o test-debug
cd test-debug
code .
put a breakpoint on line 9. Run Debug.
Expected behavior
The debugger should launch and hit the breakpoint, showing current runtime variables.
Actual behavior
The build task run successfully, but the debugger variables never show up. It looks like something is hanging because the spinner in the lower left corner is spinning. Even after tens of minutes, the debugger never fully launches.
Omnisharp Logs: omnisharp test debug.txt
Work arounds:
- Use VS Code from the Insiders Channel (download link) -or-
- Edit your launch.json and comment out the “preLaunchTask”: “build” line. If you do this you will now need to build from the command line (project will not automatically rebuild as part of start debugging). -or-
- At the end of the build, put focus on the terminal and hit enter
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Visual Studio freezes when debugging/stepping into method
When execution arrived at the breakpoint, I clicked Step Into and Visual Studio froze immediately and indefinitely. Required launch of Task Manager and ......
Read more >Visual Studio hangs constantly during build - Stack Overflow
I have seen this happen on large projects when MSBuild is running with the diagnostic switch turned on. In Visual Studio, go to...
Read more >[Windows][Visual C++] Debugger hangs after launch #530
Hello, I'm trying to integrate my own cmake build wrapper with the C/C++ extension (https://github.com/floooh/fips), this calls "cmake ...
Read more >7 Debugging Techniques for when your .NET application ...
7 Debugging Techniques for when your .NET application Freezes (hangs) · 1. Attach to the frozen process with Visual Studio · 2. Attach...
Read more >Troubleshoot pipeline runs - Azure DevOps - Microsoft Learn
An additional reason that runs may not start is that your organization goes dormant five minutes after the last user signs out of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is the VS Code issue: https://github.com/Microsoft/vscode/issues/37846
I updated my Mac to the latest of everything (VS Code, CLI, OS) and I can also reproduce this problem.
It looks like a VS Code issue – VS Code thinks the build task didn’t finish even though it did. I tried the VS Code Insiders channel and the problem went away, so I am guessing this is something that they have already fixed.
So I believe there are three possible work around:
"preLaunchTask": "build"
line. If you do this you will now need to build from the command line (project will not automatically rebuild as part of start debugging). -or-