Using Event Procedure Diagnostics

To prepare an application to generate event procedure diagnostics, you must compile it for debugging, set the run-time configuration, and execute the application specifying an error file for diagnostic output..

Compile for debugging

When compiling your application use the -Ga or other appropriate debug option. Setting a debug option compiles the code such that Event Procedures reported at runtime are easier to find. See Debugging Options for complete information about compiling your application for debugging.

Set the run-time configuration

Add the CHECK_EVENT_DURATION configuration variable to your run-time configuration file. This variable enables you to set the number of seconds to wait after the start of an event procedure before detecting and issuing a diagnostic report detailing the execution of the event. For complete information, see CHECK_EVENT_DURATION.

Execute with a specified error file

Finally, run your application using the -e parameter to specify an error file in which to capture the diagnostic report. For example:

wrun32 -e error-file myapp

Then simply run your application normally, exercising any parts of the code that you want examined. Remember that you are timing things, so take appropriate pauses to allow your chosen interval time to elapse.