Skip to main content

textual-debugger

textual-debugger (the package) provides tdb (the command-line tool and module), a full-featured terminal-based debugger for Python and other languages with a Debug Adapter Protocol (DAP) implementation. In addition to Python, tdb comes with built-in support for

  • C, C++, Fortran (via gdb or lldb-dap)
  • Rust (via gdb or lldb-dap, selected explicitly)
  • Perl (via perl -d)
  • Bash (via bash's own DEBUG trap; bash ≥ 4.4)
  • Tcsh (via source instrumentation of a stock tcsh)
  • Ruby (via the debug gem's rdbg; debug ≥ 1.9)
  • OCaml (native via lldb-dap/gdb, bytecode via ocamlearlybird)
  • Go (via Delve's dlv dap)
  • PowerShell 7 (via PowerShell Editor Services; Linux/macOS, Windows experimental)

Documentation: https://textual-debugger.readthedocs.io/ (also available offline with tdb --doc, or as plain text with tdb --doc-text)

MIT License. Copyright 2026 by Al Danial.

Highlights

  • Debugs synchronous, asynchronous, multi-threaded, and multi-process Python, with inspectors for asyncio tasks (including a task wait graph), threads, and multiprocessing / concurrent.futures children
  • Attach to a running Python (3.11+), C/C++, Go, Rust, or OCaml program by PID, with no preparation
  • Remote attach to Python, Perl, Ruby, Rust, C/C++, and Go programs
  • JSON-RPC server, MCP (v2) server, and a SKILL.md for headless and AI-assisted debugging
  • Can run the debuggee in an external terminal to debug TUI applications
  • Post-mortem exception hook and live breakpoint hooks (tdb.breakpoint() and its counterparts in Perl, Ruby, Go, C/C++/Fortran, Rust, and OCaml)
  • pytest --pdbcls=tdb.pytest_debugger:Debugger integration
  • Run mode (--run) to attach the TUI to a running job on Ctrl-C, and eval mode (--eval) to print expressions at chosen lines without the TUI
  • Entirely keyboard-driven, with vim, emacs, and Notepad-style keybindings; mouse support in graphical environments

at breakpoint task graph multiple processes thread list

Videos:

  • tdb basics views, keybindings, breakpoints, stepping, variable modification, call stack
  • asyncio tasks inspect asyncio tasks and their wait graph; code mod to allow pause
  • threads and processes inspect variables and call stacks in multiple threads and processes
  • external terminal run the debuggee in a separate terminal--ideal for debugging TUI applications

Installation

uv pip install textual-debugger        # or: pip install textual-debugger
uvx --from textual-debugger tdb my_program.py   # run without installing
pip install "textual-debugger[mcp]"    # add the optional MCP server

Quick Start

tdb --doc                        # full documentation in a terminal Markdown viewer
tdb --info                       # versions and locations of tdb, its config, and every debugger it would use
tdb my_program.py arg1 arg2      # debug a Python program (stops at the first line)
tdb -k 20 -k module.py:14 my_program.py   # run to breakpoints
tdb -k module.py:27 --if "a > 7" my_program.py   # ... stopping only when a > 7
tdb ./myprog                     # debug a native executable built with -g
tdb script.pl                    # ... or a Perl, Bash, Tcsh, Ruby, PowerShell script
tdb -a 12345                     # attach to a running Python program by PID
tdb -r remotehost:5678           # attach to a remote debugpy server

See the Quick Start page for many more examples, and the CLI Reference for every option.

Acknowledgments

tdb is built with Will McGugan's textual and Microsoft's debugpy, and was inspired by Andreas Klöckner's pudb. See About for the full acknowledgments.

Metadata

Release files for textual-debugger 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for textual-debugger 0.3.0
File Size Uploaded Provenance Actions
textual_debugger-0.3.0.tar.gz 637.1 kB With provenance Details for textual_debugger-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for textual-debugger 0.3.0
File Interpreter ABI Platform Actions
textual_debugger-0.3.0-py3-none-any.whl Python 3 none any Details for textual_debugger-0.3.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / textual_debugger-0.3.0.tar.gz

Download URL textual_debugger-0.3.0.tar.gz
Size 637.1 kB
Tags Source
SHA-256 checksum
How to use checksums
91b177d2599ddea8cca7a54ecb1f187b64886e3bed9230103c2df98cb83357ca
BLAKE2b-256 checksum
How to use checksums
a4391d162a20b9d2a992c114cecf61bc00aca95111437b4da43e406580fbacea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / textual_debugger-0.3.0-py3-none-any.whl

Download URL textual_debugger-0.3.0-py3-none-any.whl
Size 743.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34e33bbb614df6b1f9e094e9b3ad8bb5bfa92b504a3f5370ac3a68fcb0207f7e
BLAKE2b-256 checksum
How to use checksums
7ee4aa4da6230b620e828bf98094bd96dba3de754b4a5815b4a63c7ac88811c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for textual-debugger 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for textual_debugger-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page