question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run Debug stalls after build task

See original GitHub issue

Environment 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:

  1. Use VS Code from the Insiders Channel (download link) -or-
  2. 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-
  3. At the end of the build, put focus on the terminal and hit enter

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Dec 12, 2017
1reaction
gregg-miskellycommented, Dec 12, 2017

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:

  1. Install Insiders Channel -or-
  2. 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-
  3. Go to the terminal and hit the enter key at the end of the build
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found