views:

89

answers:

4

I am attempting to troubleshoot some issues on machines that I don't have access to. The problems are very intermittent and impossible to reproduce locally. I am thinking of asking them to install WinDbg so they can generate a stacktrace/dump of the process. Is this the best way? What approach have you used to get to the bottom of a problem like this?

A: 

If you are working on a windows system, you could ask the owner of the other machine to allow your machine remote desktop access. That way round you can access all the details of the other system just as it is your own system. If you are working on a linux machine, you can access the command line of the other machine through ssh client for which the owner of the other machine would have to grant a user ssh access rights and tell you that username and password. Then by further asking the root password you can work on the command line of other system, which is most powerful on linux machines.

stack programmer
A: 

Try copilot

blue_fenix
A: 

If you can build it into your code and its Windows, you could have it generate a crash dump automatically when it crashes. To do so, you'd have to write your own exception handler, and hook to it with the SetUnhandledExceptionFilter API function. Then, your handler can call MiniDumpWriteDump to write out a mini-dump for you. If the user sends you the mini-dump, you can load it into windbg and get the stack trace and other information (with luck).

I have used it successfully in the past, but it is tricky. In particular, the compiled symbols on your machine must be the ones that were in the distributed build.

Marc Bernier
Unfortunately the application is hanging, not crashing.
Jon Tackabury
You can call minidump at any time (doesn't have to be a crash). Maybe you could hook it to a keystroke or some other event?
Marc Bernier
A: 

I ended up creating a .bat file that uses cdb.exe (included with WinDbg) to generate the dumps that I need. It works perfectly and I never need to touch a remote machine. Even better, the user doesn't need any technical knowledge. Just install WinDbg and run the .bat file.

Jon Tackabury