sbdb

StreamBase Debugger (deprecated) — starts the StreamBase Debugger

SYNOPSIS

sbdb [OPTION]

DESCRIPTION

sbdb starts the command-line StreamBase Debugger, which lets you debug a StreamBase application by pausing a running StreamBase application, then stepping through the processing to understand how and when individual operators are handling streaming data. The command-line debugger is deprecated and is likely to be removed in a future release of StreamBase. The command-line debugger is replaced by the visual debugger in StreamBase Studio.

The URI to the StreamBase Server is read from the STREAMBASE_SERVER environment variable, which defaults to sb://localhost:10000/.

The sbdb command invokes the StreamBase Debugger command-line interface (CLI). For help on the available debugger commands, enter help all from the sbdb> prompt. The command descriptions are available below, and in the following topic: doc/testdebug/sbdbhelp.html.

OPTIONS

-h, --help

Displays help, then exits.

-n, --no-breakpoint-notifications

Disables the display of messages from the server when breakpoints are reached.

-p TCP-port

Sets the listen port of the sbd server, overriding setting in sbd.sbconf. The default is 10000.

Note

The -p option is not supported for StreamBase applications that have authentication enabled or are using High Availability features.

-u URI

Specifies the URI of the StreamBase Server to communicate with. See the sburi page of the Reference Guide (or see sburi(5) at the UNIX shell prompt) for a discussion of the URI format and its shortcuts. The URI can also be set using the STREAMBASE_SERVER environment variable.

--version

Prints version information and exits.

COMMANDS

break port [predicate-strings]

Sets a breakpoint on an input port of an operator (use list ports to see which ports are available). The default predicate string is true.

continue

If the StreamBase application was paused earlier (you entered a pause command), sends a request to the StreamBase Scheduler to resume processing operators.

delete breakpoint-id

Delete a breakpoint (use list breakpoints to see which breakpoints are available).

exit

The delete command is an alias for the quit command.

help [all]

Displays the StreamBase Debugger help topics. If you add the all option, the full help is displayed.

list { operators | ports | breakpoints | threads }
  • list operators

    Displays the names of all operators in the running application.

  • list ports

    Displays the names of all input ports of operators to which a breakpoint can be attached.

  • list breakpoints

    Displays all breakpoints that are currently set. The display format is:

    [id] predicate on port

    The optional id specifies a single breakpoint number.

  • list threads

    Displays the names of all threads that can be stepped in the running application. There is one thread (main) for the top-level module, plus an additional thread for each parallelized operator or module reference.

pause

The pause command sends a request to the StreamBase Scheduler to pause the processing of operators in the application. Before the application is paused, the StreamBase Scheduler allows any running operator(s) to finish executing. When the sbdb> prompt returns, the application is in a paused state.

quit

Ends the StreamBase Debugger session and closes the sbdb> CLI. Note that quitting the StreamBase Debugger does not affect the running StreamBase Server and application.

Note

To restart the StreamBase Debugger in StreamBase Studio, close the Debugger View by clicking the close (X) icon on the Debugger tab, then reopen this view by selecting Debugger from the WindowShowView menu.

status

Requests status from the StreamBase Scheduler:

  • The paused state

  • The number of breakpoints installed

  • The current state of any paused threads

Example:

sbdb> status
Status: Server is paused
0 breakpoints set
Thread 'main' is paused in i1:Union on (myint=4600, source="test")

In this example, i1:Union identifies the second input port on the operator named Union (its first port would be i0:Union). The expression in parentheses identifies the values in the schema fields at this step.

step thread

The server will process the next tuple in the requested thread, or the last stepped thread if no thread name is given.

FILES

There is no configuration file for sbdb.

ENVIRONMENT

STREAMBASE_SERVER

Optional. Contains the URI for a StreamBase Server instance. Use this variable to set a default StreamBase URI for StreamBase commands that take the –u option. If set, commands use the URI in this variable, overriding their built-in default URI, which is sb://localhost:10000. If this variable is set, you must use the –u option to communicate with any server other than the one specified in this variable. See the Multiple URI Syntax for HA Scenarios page in the Reference Guide for more on StreamBase URIs.

STREAMBASE_RETITLE_TERMINALS

Optional. If set to any value, StreamBase programs assign a terminal window title to match the name of the executable being run. By default terminal titles are not affected.

STREAMBASE_LOG_LEVEL

Optional. Sets the minimum severity of messages that StreamBase will write to syslog or stderr. Default is 0, which gets NOTICE level messages and higher. Reasonable values are -1, to disable NOTICE messages and only show WARN, ERROR and FATAL messages, 1, which adds INFO messages to the standard messages, and 2, which adds DEBUG messages.

SEE ALSO

syslog (3)