The Breakpoint will not Currently Be Hit

There are few things more frustrating than your breakpoints not being hit. In such cases, I’m sure you’ve all seen the following message when hovering over the breakpoint being missed:

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

The way that I like to resolve that (which has worked from me more often than not) is to find the pdb file which is actually loading the symbols and deleting it. Usually, that file is stale and by deleting it, you’re forcing the Build to create a new pdb file which will contain your fresh code.

Here are the steps involved.

  1. start debugging a project (press F5)
  2. go to the Debug menu, click the Windows submenu and select Modules (only visible when debugging, hence step 1)
    Modules
  3. identify the DLL you are interested in and copy the path to the folder containing the symbol file (pdb) into the address bar of Windows Explorer
    PathToPdb

Then it’s up to you whether you just delete the single file, the folder containing it, or more. As it is a shadow copy, there is no harm in deleting the whole folder. In fact, I usually go several directories above that directory and delete that directory tree:
Shadow

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>