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.

No Symbols Loaded: Breakpoints not being hit from 'debug test' CodeLens command

See original GitHub issue

Environment data

dotnet --info output: .NET Core SDK (reflecting any global.json): Version: 2.1.403 Commit: 04e15494b6

Runtime Environment: OS Name: Mac OS X OS Version: 10.14 OS Platform: Darwin

VS Code version: 1.17.2 C# Extension version: 1.13.1

Steps to reproduce

Create a simple project with NUnit unit tests. Add a breakpoint to the unit test (first line). Use CodeLens “debug test” option to debug test.

Optionally clone this sample repo: https://github.com/lmynsberge/vscode-csharp-test.git

Expected behavior

VSCode stops at first breakpoint.

Actual behavior

VSCode completes the entire unit test without stopping.

Things I’ve tried

I’ve tried adding the <DebugType>portable</DebugType> directive to my csproj file. I’ve also confirmed that both a DLL and a PDB are present in the bin/Debug folder which is where it looks like this test is coming from based on the output: NUnit Adapter 3.10.0.21: Test discovery starting NUnit Adapter 3.10.0.21: Test discovery complete Started debugging process #10478. NUnit Adapter 3.10.0.21: Test execution started Debugging selected tests in /Users/lmynsberge/git-projects/dotnet-first/unit-test-nunit/PrimeService.UnitTests/bin/Debug/netcoreapp2.0/PrimeService.UnitTests.dll NUnit3TestExecutor converted 3 of 3 NUnit test cases NUnit Adapter 3.10.0.21: Test execution complete Debugging complete.

While in debug mode, I can hover over the symbol and see that “No symbols have been loaded for this document.” I even globally set “justMyCode” to false to be sure this wasn’t blocking it. I’ve had this issue in VS before, but it’s just a setting to load symbols by default and a quick switch. I can’t find anything similar in VSCode or the extension.

Any help would be greatly appreciated.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Dec 18, 2018

I will try and take a look soon and try and figure out what is going wrong.

0reactions
dfdumaresqcommented, May 6, 2020

@tomasalles - this might help https://medium.com/front-end-weekly/solve-breakpoint-ignored-with-visual-studio-code-vscode-1-19-chrome-debugger-6d484c88b829

I fixed my problem by focusing on webpack.config.js. In my case, I had to disable source-maps, which seemed counter intuitive. (Long story), anyway good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I remedy "The breakpoint will not currently be hit. No ...
Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists...
Read more >
Troubleshoot Breakpoints in the Visual Studio Debugger
"No Symbols have been loaded for this document" ... Go to the Modules window (Debug > Windows > Modules) and check whether your...
Read more >
Debugging
You can inspect variables and stacks, set breakpoints, and do other debugging activities using VS Code's Debugging UI. These debugging features are possible...
Read more >
"The breakpoint will not currently be hit. No symbols have ...
If you are getting the "no symbols have been loaded" message, can you go to Modules window and find the symbol load information...
Read more >
Debug modules that have no debug information (PDB)
Visual Studio: on the Tools | Options | Debugging | Symbols options page, make sure that the Cache symbol in this directory field...
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