debug on client's computer (without debugger?)

W

WJ

I have a VC++ application that just crashes on one tester/client's machine.
It runs fine everywhere else.

What are the other options to debug (on the client's machine) without
installing VC++ (on the clinet's machine)? Is this possible at all? Thanks.

WJ
 
W

WJ

To add some more details, this is a managed-unmanaged mixed application, not
a pure managed C++ application.

Thanks.

WJ
 
C

Cholo Lennon

D

David Lowndes

I have a VC++ application that just crashes on one tester/client's machine.
It runs fine everywhere else.

What are the other options to debug (on the client's machine) without
installing VC++ (on the clinet's machine)? Is this possible at all? Thanks.

Use the remote debugger - in later versions of VS you can run the
remote debugger on the client computer from a share on your dev
machine. In earlier versions it requires a minimal install of the
remote debugger component.

Dave
 
W

WJ

Hi David,
Will you please explain a little detail about the share part? Is the share
on the DEV machine or on the client's machine? And I assume you'll put Exe
and DLLs under the share? Thanks!

WJ
 
C

Cholo Lennon

WJ said:
Where should the .pdb files be installed? Thanks!

Usually in the same directory of your executable. Some debuggers allow you to
load the pdb file from a custom location.
 
W

WJ

Hi Cholo,
Do you know if WinDBG supports managed-unmanaged mixed applications? I have
troulbe to get the symbol files loaded.

Thanks.

WJ
 
D

David Lowndes

Will you please explain a little detail about the share part? Is the share
on the DEV machine or on the client's machine?

The share is on the machine you have VS installed on.

Have a look for "How to: Set Up Remote Debugging" on MSDN for more
information.

Dave
 
W

WJ

Hi Cholo,
This may sould a dumb question -- I do need to copy source files to the
client computer also, correct?

Thanks.

WJ
 
C

Cholo Lennon

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top