TERMDEBUG(1)
β¨ NAME β¨
termdebug β literally a whole toolkit for debugging interactive terminal programs. that's the vibe, that's the job π
π«Ά DESCRIPTION π«Ά
okay so termdebug is a set of utilities that record and replay the input and output of terminal programs. its main goal? helping you develop and debug terminal programs, periodt.
here's the tea, bestie: other programs like termrec/termplay, nethack-recorder/player and script/scriptreplay only record the output. but when you're debugging an interactive terminal program, the input is often just as important as the output. fr fr.
so termdebug ships with these icons π:
tdrecordβ starts a program and records its input and output. the whole personality, captured.tdreplayβ starts a program and replays the input of a recording.tdviewβ shows the output of a recording.tdrerecordβ starts a program and replays the input of a recording, then records the input and output to create a new recording. it's giving remix π§tdcompareβ 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 is a set of directives with arguments.
- white space is not important, so breathe, she doesn't care about your spacing.
- 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 quote, and use C-style escaping.
the following directives are known:
envname value β set the value of environment variable name to value. name and value are strings. allenvdirectives must appear before thestartdirective. (yes, all of them, she checks π«Ά)window_sizecolumns lines [delay[>min_delay]] β set the terminal window size to columns by lines. may be specified both before and after thestartdirective. an 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.startclient [argument+] β thestartdirective indicates the client to start. zero or more arguments for the client may be specified. client and argument are strings.require_versionversion β tell the interpreter that the script language version must be version. the current version is1.
πΈ the after-start only club πΈ
the following directives may only appear after the start directive:
expectstring+ β indicate what output to expect. one or more strings may be specified.send(delay string [>min_delay])+ β specify one or more key strings to send to the client program. delay is the delay in milliseconds 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.expect_exitstatus β signal that the client should stop at this point, returning status.expect_suspendβ indicate that the client should suspend itself at this point.interactβ indicate the interaction with the user should be started at this point.
β οΈ bestie, listen: any directives after interact will be ignored. she said what she said. anything you write past that point is just journaling π
π 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)
and that's the whole page, angel π¦ this was version 2.2 of the termdebug manual, dated 2013/03/03 β go record something iconic, iykyk πβ¨
π¦ where this page comes from
- debian bookworm: termdebug 2.2+dfsg-1+b4 Β· GPL-3.0-only
- debian trixie: termdebug 2.2+dfsg-2 Β· GPL-3.0-only
- ubuntu jammy: termdebug 2.2+dfsg-1build4 Β· GPL-3.0-only
- ubuntu noble: termdebug 2.2+dfsg-1build7 Β· GPL-3.0-only
- ubuntu questing: termdebug 2.2+dfsg-2
- ubuntu resolute: termdebug 2.2+dfsg-2build1 Β· GPL-3.0-only
- ubuntu stonking: termdebug 2.2+dfsg-2build1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms