Debugging notifications

Notifications are sent by the server when some events occur.

Connection notification

When the client connects to the server and authentication is successful, a connection notification is reported with the client host IP and port number. For example:

{"status": "connected", "host": "192.168.1.104", "port": "42804"}

TPS proc start/end notification

When the TPS proc is started or ended, a notification is reported:

{"status": "started", "cmd": command_string}

or

{"status": "ended", "cmd": command_string}

The value of command_string is the TPS proc command string. For example:

{"status": "started", "cmd": "mytest {MSGID message0} {CONTEXT sms_ib_data} {ARGS {}} 
{MODE run} {VERSION 3.0}"}

Program stopped notification

When any stop events occur, a program stopped notification is reported with current situation information. The format is:

{"status": "stopped", "reason": reason_string, "frame": frame_number, "command": 
command_string, "callstack": array_of_frames, "vars": variables_object}
  • The value of reason_string is the stop reason: begin, breakpoint, or stepping.
  • The value of frame_number is the number of the current frame.
  • The value of command_string is the Tcl command to be run. This command string is after command substitution and variable substitution.
  • The value of array_of_frames is a JSON array of frames. Every frame is a JSON object with this format:
    {"level": level_number, "frame": frame_number, "type": type_string, "line": line_number, 
    "file": file_path, "cmd": command_string, "proc": proc_name}

    The values of array_of_frames are:

    • level_number, frame_number, line_number

      These are the number of levels, frames, or lines in a file.

    • type_string, where type is source, proc, eval, or precompiled.
    • command_string

      This is the Tcl command being run. This command string is unsubstitued as in the source code.

    • proc_name

      This is the name of the proc that the current command is in.

  • The value of variables_object is all visible variables in the current frame with this format:
    {name1: value1, name2: value2, ...}