MAXScript Language Reference > 3ds Max Objects > Interfaces > Core Interfaces > Core Interfaces Documentation > M >

# Interface: MXSDebugger

Interfaces > Core Interfaces > MXSDebugger

| Core Interfaces - Quick Navigation

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

    Interface: MXSDebugger

Properties:

    MXSDebugger.isDialogOpen : boolean : Read

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

    MXSDebugger.hWnd : HWND : Read

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

## Configuration - Parameters

    MXSDebugger.allowBreakOnThrow : boolean : Read|Write

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

    MXSDebugger.breakOnError : boolean : Read|Write

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

    MXSDebugger.breakOnException : boolean : Read|Write

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

    MXSDebugger.defaultBreakOnThrow : boolean : Read|Write

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

    MXSDebugger.ignoreCaughtThrows : boolean : Read|Write

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

    MXSDebugger.ignoreCaughtErrors : boolean : Read|Write

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

    MXSDebugger.ignoreCaughtExceptions : boolean : Read|Write

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

    MXSDebugger.enabledInQuietMode : boolean : Read|Write

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

    MXSDebugger.enabledInNetRender : boolean : Read|Write

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

    MXSDebugger.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".

    MXSDebugger.showGlobalConstants : boolean : Read|Write

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

    MXSDebugger.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.

    MXSDebugger.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.

    MXSDebugger.clearOutputOnOpen : boolean : Read|Write

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.

Available in 3ds Max 9 and higher.

## Configuration - Set Periods

    MXSDebugger.commandTimeOutPeriod : DWORD : Read|Write

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

    MXSDebugger.breakTimeoutPeriod : DWORD : Read|Write

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

    MXSDebugger.gcTimeoutPeriod : DWORD : Read|Write

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

    MXSDebugger.breakCyclePeriod : DWORD : Read|Write

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

Methods:

    <void>MXSDebugger.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>MXSDebugger.closeDialog()

Closes the Debugger dialog.

    <void>MXSDebugger.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>MXSDebugger.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