trachet = tracer + ratchet(step-by-step debugging service)
This program runs as a terminal filter process between terminals and applications. It provides step-by-step debugging and formatted sequence tracing service. You can watch terminal I/O sequence on realtime, and it enables you to do step-by-step execution.
Most of terminal applications such as vi have single threaded UI and typically has blocking terminal I/O. So trachet might be useful for both of terminal emulator developers and terminal application developers.
$ pip install trachet
$ git clone --recursive https://github.com/saitoha/trachet.git $ cd trachet $ python setup.py install
$ trachet [options] command
-h, --help show this help message and exit -o OUTPUT, --output=OUTPUT Specify output device or file -b, --break "break" the program at the startup time --version show version
If you specified TTY device by -o option, you can look I/O sequence tracing on realtime (See Quick Start).
- <F6> Toggle trace state ON/OFF. - <F7> Toggle break state ON/OFF. - <F8> Step to next char or control sequence. - <F9> Step to next ESC or CSI sequence.
This settings can be changed with editing $HOME/.trachet/conf.py
STEP1 First, You need to prepare two terminal windows, debugged terminal and output terminal.
STEP2 At the output terminal, type "tty" command.
$ tty /dev/pts/4
Now you get output terminal's TTY device name(=/dev/pts/4).
STEP3 At the debugged terminal, launch trachet.
Run default shell and send formatted I/O sequences to output terminal.
$ trachet -o/dev/pts/4
Run default shell and write non-colored formatted I/O sequences to a text file.
$ trachet -o log.txt
Run vim and send formatted I/O sequences to output terminal.
$ trachet -o/dev/pts/4 vim
Run emacs and send formatted I/O sequences to output terminal, and "break" emacs on startup time
$ trachet -b -o/dev/pts/4 emacs -nw
Replay output log created by script(1) step by step.
$ trachet -b -o/dev/pts/4 cat ~/typescript -
- TFF - Terminal Filter Framework https://github.com/saitoha/tff
- VT100.net http://vt100.net/
- XTerm Control Sequences http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
- all-escapes.txt http://bjh21.me.uk/all-escapes/all-escapes.txt
- Tera Term/Supported Control Functions http://ttssh2.sourceforge.jp/manual/en/about/ctrlseq.html
- RLogin/Supported Control Codes http://nanno.dip.jp/softlib/man/rlogin/ctrlcode.html
- mlterm/PROTOCOL http://mlterm.hg.sourceforge.net/hgweb/mlterm/mlterm/file/9baaded7e116/doc/en/PROTOCOL