2.3 Additional Options for Running the Script Debugger

2.3.1 Running the Debugger from the Command Line

From the command line, run the fscript command from /OperationsCenter_install_path/database/scripts to launch the debugger. Table 2-2 describes debug command options.

Table 2-2 Debug Commands

Command

Result

fscript ‑debug

Launches the debugger

Fscript –debug –f scriptname.fs

Opens a script from the /OperationsCenter_install_path/database/scripts directory in the debugger.

2.3.2 Adding Settings in Property Files to Run Scripts in the Debugger

The debugger can be set up to open all scripts run within the environment.

To update property files for the debugger:

  1. For server-side script debugging, do the following:

    1. Add the following properties to the Formula.custom.properties file:

      Script.debug=true

    2. Restart Operations Center.

    3. Launch the Operations Center console and open the debugger. All scripts open in the debugger as they are run.

      Note that only scripts run on that Operations Center server will open.

  2. For client-side script debugging, do the following:

    1. Add the following properties to the applet_params.xml file:

      <param name="Script.debug" value="true"/>

    2. Relaunch the Operations Center console and open the debugger. All scripts open in the debugger as they are run.

2.3.3 Instrumenting a Script for Debugging

Adding a debug comment to a script can be used to automatically launch the debugger when the script executes. Be sure to remember to remove a // @debug on comment before sending the script to production. Table 2-3 lists the debug comment options.

Table 2-3 Debug Comments for Script Files

Comment Code

Result

// @debug on

The debugger launches when the script runs.

// @debug off

The debugger does not launch when the script runs.