No Symbols Loaded: Breakpoints not being hit from 'debug test' CodeLens command
See original GitHub issueEnvironment 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:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
I will try and take a look soon and try and figure out what is going wrong.
@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!