Using the Break on Error Tool (Error Detection)

Related Topics

Using the Break on Error tool images\debug.gif you can, in effect, set breakpoints at any time while running an instrumented program. When you click the Break on Error tool, Purify stops at the next error it detects and displays the system's Application Error dialog box. You can click OK to terminate the program, thus ending the current run, or click Cancel to display your debugger and further investigate the error.

When you click Cancel, Purify launches the debugger specified in Use the following debugger in the Runs tab in the Preferences dialog box. If you did not specify a debugger and you do not have Visual Studio installed on your machine, Purify uses the debugger in your system Registry.

To verify that you have a debugger registered:

1.    Run Regedt32.exe.

2.    Look under HKEY_LOCAL_MACHINE.

3.    Find Software\Microsoft\WindowsNT\CurrentVersion\AeDebug. Make sure this registry key exists and that it points to an existing debugger. For example,

Debugger : REG_SZ : "C:\Windows\system32\vsjitdebugger.exe" -p %ld -e %ld

Notes:

§      Purify checks for warnings or errors immediately before the instruction is executed. This way, Purify stops the program before the instruction is executed, making it easier for you to see the values before the instruction corrupts, overwrites, or generates an exception. Purify continues to break on errors until you click the Break on Error tool again.

§      If the first error Purify stops on is not the one you want to investigate, click OK to stop the program. To quickly debug the messages you are most interested in, filter out the ones you do not want to debug. Then use the Break on Error tool to stop in the debugger on the important messages.

§      If you deselect Break on warnings in addition to errors in the Runs tab in the Preferences dialog box, Purify breaks only on errors in the program, instead of both warnings and errors.

§      If Purify stops inside its run-time DLL, PureRT.dll, you can use Visual Studio's Call Stack window or the Context drop-down list in the Variables window to navigate to your program's code.

(C) Copyright IBM Corporation 1992, 2010.