The MAXScript Debugger

The MAXScript Debugger in 3ds Max 8 implements the first half of a script development and debugging environment. It allows the main thread of 3ds Max to be suspended, the values of global and local variables to be examined and altered while the 3ds Max thread is not running, MAXScript commands to be executed from a command line, and the execution to be suspended using method calls from inside the MAXScript code. The Debugger also lets you stop or continue the execution of the suspended code.

In future versions of MAXScript, this base system will be extended with support for break points in the MAXScript Editor and more.

Accessing the Debugger Dialog

The MAXScript Debugger Dialog can be opened using

 

The Debugger Dialog

The MAXScript Debugger Dialog runs in a separate thread and is thus independent of 3ds Max. The Debugger has its own icon and will be represented as a separate application in the Windows Taskbar. This allows it to break the execution of 3ds Max threads while remaining interactive.

The Debugger Dialog is resizable - you can drag the bottom right corner or the borders of the dialog to resize. You can also minimize, maximize and close the dialog as any other window.

 Debugger_Window.gif

 

The Debugger dialog provides the following controls:

 

Note:

Functions, mouse tools, plugins, and rollouts that are defined in encrypted scripts will NOT have their local variable values dumped during error traceback, or shown in the debugger frames after a break. This is to prevent low-level access to encrypted commercial code.

Note

If you hold down the Escape key when you click on the Run button, MAXScript will typically immediately throw an exception. However, if Break on Error is turned on in the Debugger, this exception will cause a break back into the Debugger.

Note

The Stop button is enabled only when execution is broken by a script, not when execution is broken by the Break button.

The Debugger Parameters dialog

 Debugger_Settings_Dialog.gif

The MAXScript Debugger Parameters dialog provides the following options:

Note

In many cases, if a hang occurs, the hang will last only as long as the Command Timeout period. In some cases though, the hang will be complete and the 3ds Max session will need to be manually terminated.

 

See Also:

Using the MAXScript Debugger

Interface: MXSDebugger