Search code examples
visual-studiodebuggingvisual-studio-debugging

VS debugger attaches when my program crashes... but not before?


I wrote a program (well, a native C++ dll loaded by a third party app).

When (alas) it crashes, VS automatically attaches to the app, loads symbols for the dll and allows me to do a post mortem.

But if I try to attach the debugger before it crashes, it doesn't load symbols for the dll (which is definitely loaded and running at the time). It doesn't even try to load symbols for the dll in fact.

How can this be? What might be configured differently between the automatic debugger attachment and the manual one?


Solution

  • Ok, quick answer. In the VS Attach to Process dialog, I needed to select "Attach to: -> [Select...]" and check "Native code". Doh.