WJ said:
Hi Cholo,
This may sould a dumb question -- I do need to copy source files to
the client computer also, correct?
Not necessarily. Pdb file has enough information stored in it (check
http://msdn2.microsoft.com/en-us/library/yd4f8bd1(VS.80).aspx) to allow a
complete debug session.
Try debugging this simple program (using their pdb and exe files and using/not
using source code) to check what WinDbg shows you (load application and press F5
(go), then open the disassembly window):
// Try disabling compiler optimizations before compiling
// for better understanding
#include <iostream>
using namespace std;
struct Test
{
Test() { cout << __FUNCTION __ << endl; }
~Test() { cout << __FUNCTION __ << endl; }
void Foo() { cout << __FUNCTION __ << endl; }
};
int main(int, char**)
{
// Force a breakpoint into debugger
__asm int 3;
// Test code
int a = 10;
cout << a + 20 << endl;
Test test;
test.Foo();
Test pTest = new Test;
pTest->Foo();
delete pTest;
return 0;
}
Of course, with WinDbg you don't have the same level of details as VS integrated
debugger (unless you load the source code), but in general it's enough (at least
for me). A disassembler/debugger like IDA Pro is another case. It's really
fantastic, you don't need the source code. Even without pdb file IDA shows you a
big amount of information that simplify the debugging process.