dbgproxy

A mini-Win32 debugger for crash-proof automated testing on Windows.

Purpose

"The fully automated testing process was in place: whenever code changes were checked-in by a team member, our test PC would create a new build, run unit tests, and validate the simulation software by playing back pre-recorded user interactions. The only problem was, when an application crashed, Windows would display an alert that had to be closed manually..."

This is the story behind the development of this utility. Also, we wanted our perl test scripts to be able to access a program log which, on the Windows platform, was sent to the standard debugging interface (the DebugString Win32 call).

This command-line tool can launch any other program while acting as a debugger to:

Usage

From the windows explorer, you may drag-and-drop any application icon onto the icon of dbgproxy.

On the command line, simply insert a call to dbgproxy.exe in front of your usual command line:

dbgproxy.exe [your usual program invocation]

For example, the following will debug the notepad application, while asking it to open the file "textfile.txt":

dbgproxy.exe notepad.exe FileToOpen.txt

Note that the previous command will open a console window to display the debugger output. A standard command output redirection can be used to save the log to a file instead:

dbgproxy.exe notepad.exe FileToOpen.txt 2> outputLog.txt

The return codes of dbgproxy are:

-1 Failed to launch the debugged application -- check your command line.
0 The debugged application ended normally, with a return code of zero.
1 The debugged application ended normally, but with a non-zero return code.
2 The debugged application had to be killed because of a fatal error -- a description of the issue has been written to STDERR.

Download

Click here to download a zipped file of version 1.1 (January 2003).
The archive includes a Win32 executable, and a single C++ source file from which it was compiled.

I am placing this program and source code in the public domain - you are welcome to distribute and modify them as you wish, but credits and thank you notes are always appreciated

Please let me know if you find dbgproxy useful, or have any suggestions.