Horst Walter
Horst Walter

Reputation: 14071

VS2010 - Loading symbols to debug at design time (Breakpoint will not be hit)

Issue: Breakpoint will not be hit because no symbols have been loaded

Thanks to helpful fellow users I found out how to debug controls at design time: I have to start a 2nd instance of VS2010. Unfortunately, when the 2nd instance of VS2010 starts, it will load all kind of symbols, but exactly not the ones from my project.

In the modules window, I can see that the 2nd instance of VS2010 loads different modules, but I cannot find the dlls from my project. Unfortunately, I have no idea how I would reference them, because in the original project they are - of course - included. And from there I do start the 2nd instance when debugging.

I have tried the following:

  1. Set var _NT_SYMBOL_PATH
  2. Added the pdb files under Tools/options/Debugging/Symbols/Symbol files locations
  3. Checked my dll for exclusion (http://cantgrokwontgrok.blogspot.com/2009/10/visual-studio-unknown-build-error.html)

Any idea how to tackle this issue?

Upvotes: 3

Views: 3824

Answers (1)

Johannes Rudolph
Johannes Rudolph

Reputation: 35721

I have fought that battle quite a few times, so here's some things you might want to check:

  • PDB files must be in the same location the dll is loaded from
  • Use Fusion to see where the Visual Studio Designer picks up your dll from, make sure you have a PDB there
  • Check if your PDB matches your dll

Have you tried to manually load the symbols in the debugging instance? (Right-click in the Modules window, point to Load Symbols From).

Upvotes: 2

Related Questions