house fly

JSwat Project

How To: Capture Debugger Messages


Debugger Messages

Debugger messages are those messages seen in the JSwat main window whenever a command or action is performed. Each time a breakpoint is hit or a single step is performed, a message is printed to the window. Normally these messages go to a text area within the JSwat window. This text area grows indefinitely until JSwat is terminated. A scroll bar on the side of the text area allows you to scroll up to see earlier messages. The text area also has a popup menu that allows copying selected text to the system clipboard.

Capturing Messages

JSwat provides a means for capturing the messsages. Using the "Capture Messages" action found in the "Options" menu (as of 12/27/00) you can set the messages to also print to JSwat's standard output stream (the console that started JSwat) and/or to a named file. In the dialog that appears after selecting "Capture Messages" you may check the "Capture to stdout" or "Capture to file" options. If you select the "Capture to file", be sure to enter a filename in the text field at the bottom of the dialog.

To turn off the message capturing, simply bring up the same "Capture Messages" dialog and uncheck the checked options. If you only wish to change the name of the file which is catching the messages, you may simply type a new name into the dialog and press okay. The previous file will be closed and the new file will be created. Make sure the "Capture to file" option is checked before you press Ok.

Note that when capturing to file the messages do not flush to the file immediately. Turning off the file capture will cause the buffers to be flushed to disk. (I would have prefered the contents be flushed immediately but it does not seem to work.)



Back to Documentation