Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio: How to ignore pdb not loaded warnings during debug?

While debugging, I do not want visual studio to be looking for *.pdb files from 3rd party *.dlls. For example I use Jetbrains Resharper TaskRunner for unit testing. To use it requires a reference to Jetbrains.Resharper.TaskRunnerFramework.dll. When I debug my application via the TaskRunner, I end up with something similar to this picture below:

enter image description here

Well, I'm not debugging the task runner. That isn't my code anyhow. I want Visual Studio to be "smart" enough (or have a setting) to automatically know to NOT concern itself with *.pdb files for anything that isn't my code. Is this possible?

like image 590
sapbucket Avatar asked Nov 16 '17 18:11

sapbucket


People also ask

How do I remedy the breakpoint will not currently be hit no symbols have been loaded for this document warning?

Start debugging, as soon as you've arrived at a breakpoint or used Debug > Break All , use Debug > Windows > Modules . You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information.

How do I skip the code while debugging in Visual Studio?

You can also click on the line you want to skip to and hit Ctrl+F10 (Run to Cursor). It will jump directly to that line.

How do I stop the Visual Studio from loading symbols?

There is no way to turn this behavior off. You may have _NT_SYMBOL_PATH set in your VS environment. It is recommended that you do not use this environment variable with Visual Studio.

How do you fix the breakpoint will not currently be hit VS 2022?

First Close Visual Studio, Open Project again in Visual Studio -> Clean Solution, and then Rebuild Solution. Make sure, you have set the configuration to "Debug" mode and you are not working on "Release" mode while debugging your application. Click "Ok" and re-build your project.


1 Answers

Have a look at the Just My Code setting in Visual Studio. From the documentation, there's a section that sounds relevant, which discusses one of the effects of having this setting applied:

When you Step Into (Keyboard shortcut: F11) non-user code, the debugger steps over the code to the next user statement. When you Step Out (Keyboard: Shift + F11), the debugger runs to the next line of user code. If no user code is encountered then execution continues until the app exits, a breakpoint is hit, or an exception occurs.

You can enable Just My Code in the Visual Studio options under Debugging > General:

enter image description here

like image 71
Kirk Larkin Avatar answered Oct 02 '22 13:10

Kirk Larkin