8.8.1.1.1. JavaScript API Reference

8.8.1.1.1.1. Functions

initScripting(options={})

Initialize the debugger process for scripting and returns a Debugger Scripting object.

// Initialize scripting with default options
ds = initScripting();

// Initialize scripting with debugger messages suppressed
// and a 10 second timeout
ds = initScripting({ suppressMessages: true, timeout: 10000 });
Parameters:
  • options -- Optional configuration options provided as a dictionary. The available options are:

Option

Type

Description

timeout

int

Initial timeout value in milliseconds. By default, there is no timeout.

ccsRoot

str

Absolute path to the root directory of the CCS installation.

suppressMessages

bool

Suppresses printing of debugger status and GEL message to the console. (default: false)

logFile

str

If provided, enables logging to the specified file. Should be an absolute path.

Return type:

DebuggerScripting

sleep(ms)

Blocks the main thread's event loop for the prescribed number milliseconds.

// Resume CPU execution for 2 seconds
session.target.run(false);
sleep(2000);
session.target.halt();

8.8.1.1.1.2. Objects

8.8.1.1.1.3. Types