Interface: MXSDebugger

The MXSDebugger Core Interface provides access to the settings of the MAXScript Debugger in 3ds Max 8 and higher.

 

Interface: MXSDebugger

Properties:

.isDialogOpen : boolean : Read

Contains true when the Debugger's dialog is open, false otherwise. Read-only.

.hWnd : HWND : Read

Contains the Windows Handle of the Debugger's dialog. Read-only.

Configuration - Parameters

.allowBreakOnThrow : boolean : Read|Write

Get/Set the state of the Allow Break On Throw checkbox. Default is true.

.breakOnError : boolean : Read|Write

Get/Set the state of the Break On Error checkbox. Default is false.

.breakOnException : boolean : Read|Write

Get/Set the state of the Break On Exception checkbox. Default is false.

.defaultBreakOnThrow : boolean : Read|Write

Get/Set the state of the Default Throw debugBreak:on checkbox. Default is false.

 

.ignoreCaughtThrows : boolean : Read|Write

Get/Set the state of the Ignore Caught Throws checkbox. Default is true.

.ignoreCaughtErrors : boolean : Read|Write

Get/Set the state of the Ignore Caught Errors checkbox. Default is true.

.ignoreCaughtExceptions : boolean : Read|Write

Get/Set the state of the Ignore Caught Throws checkbox. Default is true.

 

.enabledInQuietMode : boolean : Read|Write

Get/Set the state of the Enable in Quiet Mode checkbox. Default is false.

.enabledInNetRender : boolean : Read|Write

Get/Set the state of the Enable in Net Render checkbox. Default is false.

.allowUnsafeMethods : boolean : Read|Write

Get/Set the state of the Allow Unsafe Method Calls checkbox. Default is false.

If true, methods and property sets that could potentially hang 3ds Max are allowed to be performed from the debugger.

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 is complete and the 3ds Max session will need to be manually terminated.

An example of this is performing:

eval loadmaxfile "ateapot.max".

 

.showGlobalConstants : boolean : Read|Write

Get/Set the state of the Show Global Constants checkbox. Default is false.

.showFirstFrameOnly : boolean : Read|Write

Get/Set the state of the Show First Frame Only checkbox. Default is false. If true, only the information associated with the top frame is displayed.

 

.stayOnTop : boolean : Read|Write

Get/Set the state of the Stay On Top checkbox. Default is false. If true, the Debugger dialog will always stay on top.

.clearOutputOnOpen : boolean : Read|Write

new.gif NEW in 3ds Max 9: Get/Set the state of the Clear Output On Open checkbox. When set to true, any previous output of the Debugger will be cleared before a new stack dump when a break occurs. When set to false, existing output will be preserved and added to. Default is true.

Configuration - Set Periods

.commandTimeOutPeriod : DWORD : Read|Write

Get/Set the Command Timeout period in seconds. Default is 15.0 sec.

.breakTimeoutPeriod : DWORD : Read|Write

Get/Set the Break Timeout period in milliseconds. Default is 5 ms.

.gcTimeoutPeriod : DWORD : Read|Write

Get/Set the GC Timeout period in seconds. Default is 5.0 sec.

.breakCyclePeriod : DWORD : Read|Write

Get/Set the Break Cycle Timeout period in milliseconds. Default is 1 ms.

 

Methods:

<void>openDialog break:<boolean> message:<string> setFocus:<boolean>

break default value: false

message default value: undefined

setFocus default value: false

Opens the Debugger dialog.

If the optional keyword break: is supplied and is true, the debugger breaks 3ds Max execution and dumps the stack.

If the optional keyword message: is supplied and is not undefined, the string will be output to the message window before dumping the stack.

If the optional keyword setFocus: is supplied and is true, OR break: is true, the focus will be set on the Debugger dialog.

For example:

mxsdebugger.openDialog message:"Welcome to MAXScript Debugger"

 

<void>closeDialog()

Closes the Debugger dialog.

<void>writeString <string>message

Writes the given string to the Debugger's message queue without adding a new line at the end and without displaying the string. Consecutive messages would be added to the same line. If an explicit new line sequence \n is provided, the resulting message will be displayed.

For example:

mxsdebugger.openDialog()

mxsdebugger.writeString "This text is "

mxsdebugger.writeString "on the same line.\n"

 

<void>writeLine <string>message

Writes the given string to the Debugger's message window and adds a new line to the end automatically. The message is displayed immediately.

For example:

mxsdebugger.openDialog()

mxsdebugger.writeLine "This message is a complete line."

 

See Also:

The MAXScript Debugger

Using the MAXScript Debugger