A newer version of Max is available. Click here to access the latest version of this document.
Debug Window
The debug window provides information about the state of your patch as it is executing. By setting a break watchpoint, you can look at the suspended execution of your patch to learn more information about its behavior.

Suspending execution of a patcher

The debug window toolbar
Many of the buttons in the toolbar have corresponding menu items in the Debug menu. You may find it easier to use the menu items, particularly the keyboard equivalents.

Understanding the debug window display
Each row in the debug window shows a message being sent from a sending object to receiving object. The sender, receiver, message, and arguments are displayed. The row highlighted in green is the message that will be sent next when you invoke the Step command. The current list of rows in the debug window is an execution stack. In other words, each object is sending a message in the middle of receiving an object.
In the example below, the first thing that happened was that a button object send a bang message to a trigger object. As a result of receiving the bang, the trigger sent a bang message to an uzi. As part of the uzi object's handling of the bang message it received, it in turn sent a bang message to another trigger object.
This sequence continues until we get to the current execution point shown, where the urn object is about to send a 1 to the pack object. The patch below shows the breakpoint where this will happen in red.
As you step through the patch, you will observe the execution stack grow and shrink.
When the execution of the patch has reached a point where Max is waiting for user input, there will be nothing left in the debug window display, which means the execution stack is now empty.
Debugging restrictions
If you are in the middle of debugging, you cannot operate your patch. In addition, you cannot close the patcher window being debugged, and you cannot quit Max. If these actions interest you more than the debugging process, choose Abort from the Debug menu, and you will be able to operate Max normally again.