Softimage SDK Programmer's Guide > Script Development > Debugging Scripts >

# Using the Microsoft Script Debugger

The Microsoft Script Debugger is installed with Internet Explorer and other common Microsoft products. However, if you need to download and install it using the instructions available at http://www.microsoft.com/downloads/.

Debug Features

The Microsoft Script Debugger provides the following standard debugging tools to help you debug your scripts:

- Setting and clearing breakpoints: when the Softimage Script Editor encounters the stop (for VBScript) or debugger (for JScript) statement in a script, the Microsoft Script Debugger opens.

- Stepping through scripts: allows you to tightly control the script execution so you can peek at variable values and see the results of each line as it happens.

- Viewing the call stack: helps you trace the course of execution through a series of nested procedures. This is useful when you are debugging scripts called from within scripts, especially when used in conjunction with stepping through scripts.

- Setting and viewing variables: you can view and set variable values on the fly using the command window with the ? statement.

  Note

  For more information, see the documentation on the Microsoft Scripting Technologies website.

Invoking the Microsoft Script Debugger

You can hook up the Microsoft Script Debugger to Softimage by right-clicking in the Script Editor's editing pane, then selecting Tools Enable External Script Debugger. This sets the JITDebug (just-in-time debugging) key in your registry to 1 (by default it is set to 0, or disabled):

    REGEDIT4
    [HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings]
    "JITDebug"=dword:00000001

Once you have enabled this link, the debugger will pop up every time your script causes an error. If you want to cut this link between Softimage and the MS Script Debugger, select Tools Disable External Script Debugger. from the editing pane's contextual menu. This sets the JITDebug key back to 0:

    REGEDIT4
    [HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings]
    "JITDebug"=dword:00000000

Returning Program Control to Softimage

When you want to close the Microsoft Script Debugger safely, select Detach All Processes from the Debug menu. If you exit or stop the debugger, Softimage will also close.