Scroll to navigation

TERMDEBUG(1) termdebug TERMDEBUG(1)

NAME

termdebug - utilities for debugging interactive terminal programs.

DESCRIPTION

termdebug is a set of utilities to record and replay the input and output of terminal programs. Its main goal is to aid in developing and debugging terminal programs. Other programs such as termrec/termplay, nethack-recorder/player and script/scriptreplay only record the output. However, when debugging an interactive terminal program, the input is often as important as the output.

termdebug consists of the following utilities:

Starts a program and records its input and output.
Starts a program and replays the input of a recording.
Shows the output of a recording.
Starts a program and replays the input of a recording, recording the input and output to create a new recording.
Compares two recordings to determine if there are differences. The reported differences can be either on the exact input/output behaviour, or on the visual behaviour.

GRAMMAR

The recordings made with the termdebug utilities use a simple format. Each recording consists of a set of directives with arguments. White space is not important. The language supports line comments which start at # and run to the end of the line. The only other elements are numbers (a sequence of digits) and strings. Strings start and end with a double qoute, and use C-style escaping. The following directives are known:

Set the value of environment variable name to value. name and value are strings. All env directives must appear before the start directive.
Set the terminal window size to columns by lines_. May be specified both before and after the start directive. On optional delay in milliseconds may be specified. Furthermore, min_delay may be specified to force a wait of at least min_delay milliseconds regardless of program options changing the key delay.
The start directive indicates the client to start. Zero or more arguments for the client may be specified. client and argument are strings.
Tell the interpreter that the script langauge version must be version. The current version is 1.

The following directives may only appear after the start directive:

Indicate what output to expect. One or more strings may be specified.
Specify one or more key strings to send to the client program. delay is the delay in miliseconds to wait before sending string. Furthermore, min_delay may be specified to force a wait of at least min_delay milliseconds regardless of program options changing the key delay.
Signal that the client should stop at this point, returning status.
Indicate that the client should suspend itself at this point.
Indicate the interaction with the user should be started at this point. Any directives after this point will be ignored.

AUTHOR

G.P. Halkes <termdebug@ghalkes.nl>

COPYRIGHT

Copyright © 2010,2012 G.P. Halkes
termdebug is licensed under the GNU General Public License version 3.
For more details on the license, see the file COPYING in the documentation directory. On Un*x systems this is usually /usr/share/doc/termdebug.

SEE ALSO

tdrecord(1), tdreplay(1), tdrerecord(1), tdview(1)

2013/03/03 2.2