How to debug application built on another machine?

  • Thread starter Thread starter =?ISO-8859-2?Q?Mihajlo_Cvetanovi=E6?=
  • Start date Start date
?

=?ISO-8859-2?Q?Mihajlo_Cvetanovi=E6?=

My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened
the project, pressed Cancel to the above message, and chose this
instance of Visual Studio. But I couldn't step through my code, only
through internal MFC code.

Does anybody knows what am I doing wrong?
 
When the debugger is attached you can see whether it could load the pdb in
the debug output window. It should say something like "symbols loaded" next
to your exe or dll.
 
Mihajlo,
My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened the
project, pressed Cancel to the above message, and chose this instance of
Visual Studio. But I couldn't step through my code, only through internal
MFC code.

Does anybody knows what am I doing wrong?

The debugger is probably not finding the symbols for your libraries. Once
you start debugging, open the Modules Window, and you should see your
exe/dlls in that list. My bet is that they say "symbols not loaded". If so,
you can right click on each one and select "Reload Symbols", which will
bring up a Open File dialog where you can browse for the correct pdb file.

Also, you'll want to load your source files in VS as well.
 
Thank you fellows for the useful info, the error was the most obvious
one: the application and the project don't match, with a half an hour
distance.

This only proves the point that whatever job you're trying to rush on
Friday at 9 PM (like debugging the crash on another machine), it can't
come out good.

Saying that, I have another question. Is there a way to force the
debugger to use inappropriate PDB? Granted, it would show the wrong info
in some parts of the code, but it would still be usable in other parts.
 
Back
Top