Normally when an application is not working correctly, adding temporary printf statements or WinMessageBox calls can provide additional debugging information. SOM provides somPrintf that writes debugging information to the current stdout device. This is usually not convenient for Workplace Shell applications, because they are implemented in DLLs.

To redirect the debugging output to another location, SOM provides a replaceable procedure called SOMOutCharRoutine. In addition to handling calls from somPrintf, the SOMOutCharRoutine is also invoked by the <classname>MethodDebug calls in every method. By replacing this procedure, output can be redirected from stdout to a more suitable location. When debugging is complete, the user-defined procedure can be removed or commented-out.

Debugging information can be written to any number of places:


[Back] [Next]