Purpose:Monitor the OutputDebugString API



DEBUGMONITOR [/=] n command


nNumber of repetitions (or FOREVER)
commandCommand to execute when condition is triggered






DEBUGMONITOR looks for any process calling the Windows OutputDebugString API. You cannot use DEBUGMONITOR If you are running a debugger (for example, Visual Studio), as DEBUGMONITOR will not see the OutputDebugString calls.


DEBUGMONITOR will set the environment variable _OUTPUTDEBUGSTRING to the value specified in the OutputDebugString call.


The command line will be parsed and expanded before DEBUGMONITOR is executed, so if you want to pass redirection characters or variables to command you will need to protect them (by enclosing in single back quotes, doubling the %'s, or using command grouping).


If the last argument on the line is a single (, it is interpreted as the beginning of a command group. DEBUGMONITOR will append the following lines (in a batch file) or prompt you for more input (at the command line) until it gets a closing ).


The monitoring runs asynchronously in a separate thread. When the condition is triggered, the command will be executed immediately. This may cause problems if you try to write to the display or access files while the main TCC thread is also performing I/O. You may need to use START or DETACH in command to avoid conflicts.




/=Display the DEBUGMONITOR command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.


/CRemove the OutputDebugString monitor.