How to Remedy "The Breakpoint Will Not Currently Be Hit. No Symbols Have Been Loaded For This Document." Warning

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. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.

In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe, i.e. the bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.

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. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.

In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe, i.e. the bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.

VS2015 The breakpoint will not currently be hit. No symbols have been loaded for this document

Fixing:

  1. Right mouse click your project
  2. Select Properties
  3. Select the Build tab
  4. Make sure Define DEBUG constant and Define TRACE constant are
    checked
  5. Click the Advanced button at the bottom of the Build tabpage
  6. Make sure that Debug Info: is set to Full
  7. Click OK and save changes
  8. Clean solution and rebuild the project

Link to source Fixing “The breakpoint will not currently be hit. No symbols have been loaded for this document.”.

(step 6 generates the .pdb files, these are the debugging symbols)


For more information see next screenshots. Build settings:

Build options

Advanced settings of build:

Advanced build settings

Checked for Microsoft Visual Studio Enterprise 2015 and Microsoft Visual Studio Professional 2017.

“The breakpoint will not currently be hit. No symbols have been loaded for this document.” - .pdb loaded from wrong place?

Turns out that I had set the configuration to Release when I started the debugger. When I change it to Debug, it works as expected!

C# Visual Studio Service Debugging The breakpoint will not currently be hit. No Symbols have been loaded for this document

I usually get this message when I have changed code in a project A and forgot to compile it.

The other project B, which references project A, has the up-to-date source code of A on the screen, but started with an outdated assembly of A. So it cannot enable breakpoints because the code does not match the assembly.

There's one more thing, which in my opinion is a bug and a pain in the ass, but according to MS is by design (I have asked them):

Since Visual Studio 2015, the compilation of project B does NOT automatically include modified referenced assemblies, which in this example is assembly A. There is a local copy of A somewhere in B, which is used instead. Same result as above: up-to-date code, but outdated assembly.
Instead of compiling, you have to rebuild it!

There's another one more thing:

You have to compile for DEBUG mode. In Release mode, the default project settings do not allow proper debugging, like they did in VS 2008 for example.



Related Topics



Leave a reply



Submit