views:

84

answers:

4

I have a 'release with debug info' unmanaged c++ .exe (built with VS2005) deployed onto another PC, the .exe and .pdb are in the same folder.

When I try to attach to the process from VS2005, either locally or remotely from my dev PC, all my breakpoints become disabled. I don't get any warning/error popups which makes me think the PDB file is being found, but not seen as 'good'. Is that the right interpretation? I think if it couldn't see the PDB I'd get a "no debug information could be found" popup.

Has anyone got any ideas what can be wrong?

A: 

My best guess is that Visual Studio doesn't find the source code PDB files refer to. I am not able to look now, but I think you have the possibility to specify the location of the source code by hand in these cases (I don't have visual studio available at the moment).

Cătălin Pitiș
+1  A: 

Check the output window - it should tell you if debug symbols are being found when the debugger attaches.

Are the breakpoints marked with a yellow exclamation mark triangle? This could be due to the PDB not corrresponding to the version of the source you're using. Right click on the breakpoint and select the option that allows the source code to be different (or rebuild your executable)

HTH

Seb

Seb Rose
A: 

The PDB was being generated, but another compiler setting meant nothing useful was being put inside it!

John
A: 

The PDB was being generated, but another compiler setting meant nothing useful was being put inside it?!?!?!?! What was the name of the oprion in VS?

asd
Somewhat confusingly, there are two settings affecting PDB generation. Under the linker you tell it if it should emit the PDB at all. Under compiler settings you choose what level of debug information to generate.
John