textual-debugger 0.2.16__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- textual_debugger-0.3.2/PKG-INFO +182 -0
- textual_debugger-0.3.2/README.md +108 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/pyproject.toml +21 -4
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/__init__.py +1 -1
- textual_debugger-0.3.2/src/tdb/_proc.py +90 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/_timeouts.py +24 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/server.py +17 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/session.py +22 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/Devel/TdbRemote.pm +12 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/padwalker.py +81 -15
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/server.py +50 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/session.py +78 -9
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/powershell/server.py +7 -19
- textual_debugger-0.3.2/src/tdb/adapters/ruby/ready/tdb_rdbg_ready.rb +49 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/ruby/server.py +90 -20
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/server.py +13 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/session.py +47 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app.py +312 -33
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app_handlers/dap_events.py +16 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app_handlers/inspection.py +2 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app_helpers.py +6 -41
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/breakpoint_hook.py +1 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/cli.py +607 -80
- textual_debugger-0.3.2/src/tdb/config_dir.py +52 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/dap/client.py +168 -31
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/dap/messages.py +49 -12
- textual_debugger-0.3.2/src/tdb/detach_relay.py +409 -0
- textual_debugger-0.3.2/src/tdb/docs/about.md +48 -0
- textual_debugger-0.3.2/src/tdb/docs/automation/json-rpc.md +143 -0
- textual_debugger-0.3.2/src/tdb/docs/automation/mcp.md +101 -0
- textual_debugger-0.3.2/src/tdb/docs/automation/record-replay.md +49 -0
- textual_debugger-0.3.2/src/tdb/docs/index.md +83 -0
- textual_debugger-0.3.2/src/tdb/docs/installation.md +25 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/bash.md +27 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/c-cpp-fortran.md +153 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/go.md +113 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/index.md +214 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/ocaml.md +148 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/perl.md +172 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/powershell.md +67 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/ruby.md +57 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/rust.md +111 -0
- textual_debugger-0.3.2/src/tdb/docs/languages/tcsh.md +32 -0
- textual_debugger-0.3.2/src/tdb/docs/python/async-tasks.md +41 -0
- textual_debugger-0.3.2/src/tdb/docs/python/attach-to-process.md +134 -0
- textual_debugger-0.3.2/src/tdb/docs/python/breakpoint-hook.md +51 -0
- textual_debugger-0.3.2/src/tdb/docs/python/post-mortem.md +47 -0
- textual_debugger-0.3.2/src/tdb/docs/python/processes.md +34 -0
- textual_debugger-0.3.2/src/tdb/docs/python/pytest.md +44 -0
- textual_debugger-0.3.2/src/tdb/docs/python/threads.md +23 -0
- textual_debugger-0.3.2/src/tdb/docs/python/tracing.md +307 -0
- textual_debugger-0.3.2/src/tdb/docs/quickstart.md +101 -0
- textual_debugger-0.3.2/src/tdb/docs/reference/cli.md +120 -0
- textual_debugger-0.3.2/src/tdb/docs/reference/configuration.md +147 -0
- textual_debugger-0.3.2/src/tdb/docs/tutorial-mcp-debugging.md +314 -0
- textual_debugger-0.3.2/src/tdb/docs/using/breakpoints.md +26 -0
- textual_debugger-0.3.2/src/tdb/docs/using/call-stack.md +4 -0
- textual_debugger-0.3.2/src/tdb/docs/using/console.md +33 -0
- textual_debugger-0.3.2/src/tdb/docs/using/crash-detection.md +10 -0
- textual_debugger-0.3.2/src/tdb/docs/using/debugging-controls.md +49 -0
- textual_debugger-0.3.2/src/tdb/docs/using/eval-mode.md +46 -0
- textual_debugger-0.3.2/src/tdb/docs/using/evaluate-console.md +70 -0
- textual_debugger-0.3.2/src/tdb/docs/using/external-terminal.md +34 -0
- textual_debugger-0.3.2/src/tdb/docs/using/keybindings.md +137 -0
- textual_debugger-0.3.2/src/tdb/docs/using/layout.md +22 -0
- textual_debugger-0.3.2/src/tdb/docs/using/remote-attach.md +67 -0
- textual_debugger-0.3.2/src/tdb/docs/using/run-detached.md +112 -0
- textual_debugger-0.3.2/src/tdb/docs/using/run-mode.md +122 -0
- textual_debugger-0.3.2/src/tdb/docs/using/variables.md +47 -0
- textual_debugger-0.3.2/src/tdb/docs/using/vim-edit-mode.md +214 -0
- textual_debugger-0.3.2/src/tdb/documentation.py +149 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/eval_mode.py +4 -15
- textual_debugger-0.3.2/src/tdb/examples/Python/trace/checkout.yaml +17 -0
- textual_debugger-0.3.2/src/tdb/examples/Python/trace/inventory_service.py +70 -0
- textual_debugger-0.3.2/src/tdb/examples/Python/trace/orders_service.py +89 -0
- textual_debugger-0.3.2/src/tdb/examples/Python/trace/send_orders.py +39 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/info.py +26 -8
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/inspection.py +8 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/keybindings/__init__.py +22 -13
- textual_debugger-0.3.2/src/tdb/languages/_python_adapter.py +114 -0
- textual_debugger-0.3.2/src/tdb/languages/_python_gdb_helper.py +327 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/base.py +67 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/bash.py +2 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/cpp.py +24 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/errors.py +1 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/go.py +6 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/ocaml.py +8 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/perl.py +16 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/powershell.py +4 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/python.py +117 -4
- textual_debugger-0.3.2/src/tdb/languages/python_attach.py +1020 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/registry.py +7 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/ruby.py +2 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/rust.py +1 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/tcsh.py +3 -2
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/mcp/__init__.py +5 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/mcp/session.py +1 -1
- textual_debugger-0.3.2/src/tdb/mkdocs.yml +116 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/persist.py +193 -34
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/post_mortem.py +1 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/processes_cache.py +20 -32
- textual_debugger-0.3.2/src/tdb/pytest_debugger.py +169 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/replay.py +12 -3
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/replay_tui.py +55 -23
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/run_mode.py +98 -31
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/probes/base.py +4 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/server/app.py +9 -3
- textual_debugger-0.3.2/src/tdb/server/auth.py +182 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/server/runner.py +80 -30
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/controller.py +450 -60
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/state.py +16 -7
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/terminal.py +20 -0
- textual_debugger-0.3.2/src/tdb/source_discovery.py +182 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/source_edit.py +60 -5
- textual_debugger-0.3.2/src/tdb/source_search.py +150 -0
- textual_debugger-0.3.2/src/tdb/terminal_text.py +140 -0
- textual_debugger-0.3.2/src/tdb/tool_env.py +87 -0
- textual_debugger-0.3.2/src/tdb/trace/__init__.py +1 -0
- textual_debugger-0.3.2/src/tdb/trace/agent/_tdb_trace_agent.py +2024 -0
- textual_debugger-0.3.2/src/tdb/trace/agent/sitecustomize.py +156 -0
- textual_debugger-0.3.2/src/tdb/trace/capture.py +364 -0
- textual_debugger-0.3.2/src/tdb/trace/contract.py +87 -0
- textual_debugger-0.3.2/src/tdb/trace/discover.py +327 -0
- textual_debugger-0.3.2/src/tdb/trace/launch.py +810 -0
- textual_debugger-0.3.2/src/tdb/trace/merge.py +101 -0
- textual_debugger-0.3.2/src/tdb/trace/perfetto.py +632 -0
- textual_debugger-0.3.2/src/tdb/trace/spec.py +368 -0
- textual_debugger-0.3.2/src/tdb/vi/__init__.py +31 -0
- textual_debugger-0.3.2/src/tdb/vi/bindings.py +1675 -0
- textual_debugger-0.3.2/src/tdb/vi/engine.py +2286 -0
- textual_debugger-0.3.2/src/tdb/vi/ex.py +607 -0
- textual_debugger-0.3.2/src/tdb/vi/global_cmd.py +516 -0
- textual_debugger-0.3.2/src/tdb/vi/marks.py +192 -0
- textual_debugger-0.3.2/src/tdb/vi/search.py +126 -0
- textual_debugger-0.3.2/src/tdb/vi/substitute.py +267 -0
- textual_debugger-0.3.2/src/tdb/vi/textedit.py +109 -0
- textual_debugger-0.3.2/src/tdb/vi/textobjects.py +593 -0
- textual_debugger-0.3.2/src/tdb/vi_app.py +226 -0
- textual_debugger-0.3.2/src/tdb/widgets/code_editor.py +781 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/code_view.py +204 -34
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/console_view.py +5 -3
- textual_debugger-0.3.2/src/tdb/widgets/key_help.py +171 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/modals.py +78 -23
- textual_debugger-0.3.2/src/tdb/widgets/searchable_markdown.py +480 -0
- textual_debugger-0.3.2/src/tdb/widgets/source_modal.py +220 -0
- textual_debugger-0.3.2/src/tdb/widgets/syntax_themes.py +69 -0
- textual_debugger-0.3.2/src/tdb/widgets/theme_picker.py +86 -0
- textual_debugger-0.3.2/src/tdb/widgets/vi_status_bar.py +156 -0
- textual_debugger-0.3.2/src/textual_debugger.egg-info/PKG-INFO +182 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/textual_debugger.egg-info/SOURCES.txt +89 -1
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/textual_debugger.egg-info/requires.txt +3 -1
- textual_debugger-0.2.16/PKG-INFO +0 -2702
- textual_debugger-0.2.16/README.md +0 -2630
- textual_debugger-0.2.16/src/tdb/README.md +0 -2630
- textual_debugger-0.2.16/src/tdb/widgets/code_editor.py +0 -738
- textual_debugger-0.2.16/src/textual_debugger.egg-info/PKG-INFO +0 -2702
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/LICENSE +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/setup.cfg +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/arith_for.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/declares.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/bash/tdb_harness.sh +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/native/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/native/gdb_stl_printers.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/native/tdb.h +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/ocaml/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/ocaml/lldb_formatters.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/Devel/TdbCompile.pm +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/helpers.pl +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/padwalker_src/Makefile.PL +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/padwalker_src/PadWalker.pm +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/padwalker_src/PadWalker.xs +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/protocol.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/perl/refs.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/powershell/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/powershell/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/powershell/locate.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/powershell/output.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/powershell/tdb_launch.ps1 +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/ruby/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/ruby/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/ruby/tdb.rb +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/seqs.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/breakpoints.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/cli.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/guardian.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/inspect.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/instrumenter.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/models.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/protocol.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/runtime.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/scanner.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/adapters/tcsh/transport.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app_handlers/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app_handlers/routing.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/app_handlers/ui_panels.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/dap/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/dap/protocol.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/dap/reverse.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/dap/types.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examine.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/C/breakpoint_hook_demo.c +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/C/pi_digits.c +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/C++/breakpoint_hook_demo.cpp +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/C++/pi_digits.cpp +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Fortran/breakpoint_hook_demo.f90 +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Fortran/pi_digits.f90 +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Go/breakpoint_hook_demo/go.mod +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Go/breakpoint_hook_demo/main.go +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Go/pi_digits.go +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/OCaml/breakpoint_hook_demo.ml +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/OCaml/pi_digits.ml +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Perl/breakpoint_hook_demo.pl +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Perl/pi_digits.pl +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/PowerShell/pi_digits.ps1 +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Python/pi_digits.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Ruby/breakpoint_hook_demo.rb +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Ruby/pi_digits.rb +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Rust/breakpoint_hook_demo/Cargo.toml +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Rust/breakpoint_hook_demo/src/main.rs +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/Rust/pi_digits.rs +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/bash/pi_digits.sh +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/examples/tcsh/pi_digits.tcsh +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/go_concurrency/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/go_concurrency/analyzer.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/go_concurrency/classifier.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/go_concurrency/collector.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/go_concurrency/models.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/inspection_full.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/languages/native_tools.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/mcp/__main__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/mcp/server.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/analyzer.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/classifier.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/collector.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/models.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/probes/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/probes/gdb.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/probes/gdb_script.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/probes/lldb.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/rust_concurrency/probes/lldb_script.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/server/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/server/event_handler.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/server/handlers.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/server/rpc_types.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/breakpoint_sync.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/child_processes.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/errors.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/event_bus.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/inspect_service.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/messages.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/post_mortem_loader.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/recorder.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/statement_stepper.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/session/textual_handler.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/source_analysis.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/__init__.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/_inspection_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/async_tasks_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/breakpoint_view.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/evaluate_console.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/full_contents_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/goroutines_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/menu_bar.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/processes_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/rust_concurrency_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/stack_view.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/status_bar.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/threads_modal.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/tdb/widgets/variable_view.py +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/textual_debugger.egg-info/dependency_links.txt +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/textual_debugger.egg-info/entry_points.txt +0 -0
- {textual_debugger-0.2.16 → textual_debugger-0.3.2}/src/textual_debugger.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: textual-debugger
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: A TUI debugger for Python, Perl, and other languages. Based on textual.
|
|
5
|
+
Author-email: Al Danial <al.danial@gmail.com>
|
|
6
|
+
License: textual-debugger is licensed to you under the MIT/X Consortium license:
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Albert Danial
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person
|
|
11
|
+
obtaining a copy of this software and associated documentation
|
|
12
|
+
files (the "Software"), to deal in the Software without
|
|
13
|
+
restriction, including without limitation the rights to use,
|
|
14
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the
|
|
16
|
+
Software is furnished to do so, subject to the following
|
|
17
|
+
conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be
|
|
20
|
+
included in all copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
23
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
24
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
25
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
27
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
28
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
29
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Project-URL: Homepage, https://github.com/AlDanial/tdb
|
|
33
|
+
Project-URL: Issues, https://github.com/AlDanial/tdb/issues
|
|
34
|
+
Project-URL: Source, https://github.com/AlDanial/tdb
|
|
35
|
+
Keywords: debugger,tui,textual,debugpy,debug,DAP
|
|
36
|
+
Classifier: Development Status :: 4 - Beta
|
|
37
|
+
Classifier: Environment :: Console
|
|
38
|
+
Classifier: Intended Audience :: Developers
|
|
39
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
40
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
41
|
+
Classifier: Programming Language :: Python :: 3
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
47
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
48
|
+
Requires-Python: >=3.11
|
|
49
|
+
Description-Content-Type: text/markdown
|
|
50
|
+
License-File: LICENSE
|
|
51
|
+
Requires-Dist: textual>=8.0.0
|
|
52
|
+
Requires-Dist: debugpy>=1.8.20
|
|
53
|
+
Requires-Dist: pygments>=2.17.0
|
|
54
|
+
Requires-Dist: fastapi>=0.115.0
|
|
55
|
+
Requires-Dist: uvicorn>=0.30.0
|
|
56
|
+
Requires-Dist: prompt_toolkit<3.1,>=3.0.52
|
|
57
|
+
Requires-Dist: pyyaml>=6.0
|
|
58
|
+
Provides-Extra: edit
|
|
59
|
+
Requires-Dist: textual[syntax]>=8.0.0; extra == "edit"
|
|
60
|
+
Provides-Extra: mcp
|
|
61
|
+
Requires-Dist: mcp<3.0.0,>=2.0.0; extra == "mcp"
|
|
62
|
+
Provides-Extra: dev
|
|
63
|
+
Requires-Dist: textual-debugger[mcp]; extra == "dev"
|
|
64
|
+
Requires-Dist: pytest; extra == "dev"
|
|
65
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
66
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
67
|
+
Requires-Dist: httpx; extra == "dev"
|
|
68
|
+
Requires-Dist: matplotlib; extra == "dev"
|
|
69
|
+
Requires-Dist: pyyaml; extra == "dev"
|
|
70
|
+
Requires-Dist: toml; extra == "dev"
|
|
71
|
+
Requires-Dist: ruff; extra == "dev"
|
|
72
|
+
Requires-Dist: ipython; extra == "dev"
|
|
73
|
+
Dynamic: license-file
|
|
74
|
+
|
|
75
|
+
# `textual-debugger`
|
|
76
|
+
|
|
77
|
+
`textual-debugger` (the package) provides `tdb` (the command-line tool and module),
|
|
78
|
+
a full-featured terminal-based debugger for Python and other languages
|
|
79
|
+
with a Debug Adapter Protocol (DAP) implementation. In addition to Python,
|
|
80
|
+
`tdb` comes with built-in support for
|
|
81
|
+
- C, C++, Fortran (via `gdb` or `lldb-dap`)
|
|
82
|
+
- Rust (via `gdb` or `lldb-dap`, selected explicitly)
|
|
83
|
+
- Perl (via `perl -d`)
|
|
84
|
+
- Bash (via bash's own `DEBUG` trap; bash ≥ 4.4)
|
|
85
|
+
- Tcsh (via source instrumentation of a stock `tcsh`)
|
|
86
|
+
- Ruby (via the [debug gem](https://github.com/ruby/debug)'s `rdbg`; debug ≥ 1.9)
|
|
87
|
+
- OCaml (native via `lldb-dap`/`gdb`, bytecode via [ocamlearlybird](https://github.com/hackwaly/ocamlearlybird))
|
|
88
|
+
- Go (via [Delve](https://github.com/go-delve/delve)'s `dlv dap`)
|
|
89
|
+
- PowerShell 7 (via [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices); Linux/macOS, Windows experimental)
|
|
90
|
+
|
|
91
|
+
**Documentation: https://textual-debugger.readthedocs.io/**
|
|
92
|
+
(also available offline with `tdb --doc`, or as plain text with `tdb --doc-text`)
|
|
93
|
+
|
|
94
|
+
- PyPI: https://pypi.org/project/textual-debugger/
|
|
95
|
+
- GitHub: https://github.com/AlDanial/tdb
|
|
96
|
+
|
|
97
|
+
MIT License. Copyright 2026 by Al Danial.
|
|
98
|
+
|
|
99
|
+
## Highlights
|
|
100
|
+
|
|
101
|
+
- Debugs synchronous, asynchronous, multi-threaded, and multi-process Python,
|
|
102
|
+
with inspectors for `asyncio` tasks (including a task wait graph), threads,
|
|
103
|
+
and `multiprocessing` / `concurrent.futures` children
|
|
104
|
+
- Attach to a running Python (3.11+), C/C++, Go, Rust, or OCaml program
|
|
105
|
+
by PID, with no preparation
|
|
106
|
+
- Remote attach to Python, Perl, Ruby, Rust, C/C++, and Go programs
|
|
107
|
+
- JSON-RPC server, MCP (v2) server, and a `SKILL.md` for headless and
|
|
108
|
+
AI-assisted debugging
|
|
109
|
+
- Can run the debuggee in an external terminal to debug TUI applications
|
|
110
|
+
- Post-mortem exception hook and live breakpoint hooks (`tdb.breakpoint()` and
|
|
111
|
+
its counterparts in Perl, Ruby, Go, C/C++/Fortran, Rust, and OCaml)
|
|
112
|
+
- `pytest --pdbcls=tdb.pytest_debugger:Debugger` integration
|
|
113
|
+
- Run mode (`--run`) to attach the TUI to a running job on Ctrl-C, and eval
|
|
114
|
+
mode (`--eval`) to print expressions at chosen lines without the TUI
|
|
115
|
+
- Entirely keyboard-driven, with vim, emacs, and Notepad-style keybindings;
|
|
116
|
+
mouse support in graphical environments
|
|
117
|
+
|
|
118
|
+
## Gallery
|
|
119
|
+
|
|
120
|
+
<p align="center">
|
|
121
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/async_breakpoint.png" alt="at breakpoint" width="300">
|
|
122
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/async_task_graph.png" alt="task graph" width="300">
|
|
123
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/multiprocessing_process_3.png" alt="multiple processes" width="300">
|
|
124
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/threading_list.png" alt="thread list" width="300">
|
|
125
|
+
</p>
|
|
126
|
+
|
|
127
|
+
Videos:
|
|
128
|
+
- [tdb basics](https://youtu.be/2_qf2WZDHuA) views, keybindings, breakpoints, stepping, variable modification, call stack
|
|
129
|
+
- [asyncio tasks](https://youtu.be/vM4tODuqMGg) inspect asyncio tasks and their wait graph; code mod to allow pause
|
|
130
|
+
- [threads and processes](https://youtu.be/J8LOARLs2oQ) inspect variables and call stacks in multiple threads and processes
|
|
131
|
+
- [external terminal](https://youtu.be/121aihjAQ8g) run the debuggee in a separate terminal--ideal for debugging TUI applications
|
|
132
|
+
|
|
133
|
+
## Installation
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
uv pip install textual-debugger # or: pip install textual-debugger
|
|
137
|
+
uvx --from textual-debugger tdb my_program.py # run without installing
|
|
138
|
+
pip install "textual-debugger[mcp]" # add the optional MCP server
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Quick Start
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
tdb --doc # full documentation in a terminal Markdown viewer
|
|
145
|
+
tdb --info # versions and locations of tdb, its config, and every debugger it would use
|
|
146
|
+
tdb my_program.py arg1 arg2 # debug a Python program (stops at the first line)
|
|
147
|
+
tdb -k 20 -k module.py:14 my_program.py # run to breakpoints
|
|
148
|
+
tdb -k module.py:27 --if "a > 7" my_program.py # ... stopping only when a > 7
|
|
149
|
+
tdb ./myprog # debug a native executable built with -g
|
|
150
|
+
tdb script.pl # ... or a Perl, Bash, Tcsh, Ruby, PowerShell script
|
|
151
|
+
tdb -a 12345 # attach to a running Python program by PID
|
|
152
|
+
tdb -r remotehost:5678 # attach to a remote debugpy server
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
See the [Quick Start](https://textual-debugger.readthedocs.io/quickstart/)
|
|
156
|
+
page for many more examples, and the
|
|
157
|
+
[CLI Reference](https://textual-debugger.readthedocs.io/reference/cli/)
|
|
158
|
+
for every option.
|
|
159
|
+
|
|
160
|
+
## Function Tracing
|
|
161
|
+
|
|
162
|
+
`tdb --trace` records calls to the functions you name in a Python program and
|
|
163
|
+
every process it starts, with no breakpoints and no TUI, and writes a
|
|
164
|
+
[Perfetto](https://ui.perfetto.dev) trace with one lane per thread and per
|
|
165
|
+
`asyncio` task. `--trace-merge` weaves the traces of several services into one
|
|
166
|
+
timeline, and `--trace-discover` writes a starter spec.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
tdb --trace checkout.yaml --trace-name orders orders_service.py -- --port 8002
|
|
170
|
+
tdb --trace-merge inv.jsonl ord.jsonl --trace-out all # open all.perfetto.json in ui.perfetto.dev
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
See [Function Tracing](https://textual-debugger.readthedocs.io/python/tracing/)
|
|
174
|
+
for the spec format, a two-service walkthrough, and the limitations.
|
|
175
|
+
|
|
176
|
+
## Acknowledgments
|
|
177
|
+
|
|
178
|
+
`tdb` is built with Will McGugan's [textual](https://github.com/Textualize/textual)
|
|
179
|
+
and Microsoft's [debugpy](https://github.com/microsoft/debugpy), and was
|
|
180
|
+
inspired by Andreas Klöckner's [pudb](https://pypi.org/project/pudb/).
|
|
181
|
+
See [About](https://textual-debugger.readthedocs.io/about/) for the full
|
|
182
|
+
acknowledgments.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# `textual-debugger`
|
|
2
|
+
|
|
3
|
+
`textual-debugger` (the package) provides `tdb` (the command-line tool and module),
|
|
4
|
+
a full-featured terminal-based debugger for Python and other languages
|
|
5
|
+
with a Debug Adapter Protocol (DAP) implementation. In addition to Python,
|
|
6
|
+
`tdb` comes with built-in support for
|
|
7
|
+
- C, C++, Fortran (via `gdb` or `lldb-dap`)
|
|
8
|
+
- Rust (via `gdb` or `lldb-dap`, selected explicitly)
|
|
9
|
+
- Perl (via `perl -d`)
|
|
10
|
+
- Bash (via bash's own `DEBUG` trap; bash ≥ 4.4)
|
|
11
|
+
- Tcsh (via source instrumentation of a stock `tcsh`)
|
|
12
|
+
- Ruby (via the [debug gem](https://github.com/ruby/debug)'s `rdbg`; debug ≥ 1.9)
|
|
13
|
+
- OCaml (native via `lldb-dap`/`gdb`, bytecode via [ocamlearlybird](https://github.com/hackwaly/ocamlearlybird))
|
|
14
|
+
- Go (via [Delve](https://github.com/go-delve/delve)'s `dlv dap`)
|
|
15
|
+
- PowerShell 7 (via [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices); Linux/macOS, Windows experimental)
|
|
16
|
+
|
|
17
|
+
**Documentation: https://textual-debugger.readthedocs.io/**
|
|
18
|
+
(also available offline with `tdb --doc`, or as plain text with `tdb --doc-text`)
|
|
19
|
+
|
|
20
|
+
- PyPI: https://pypi.org/project/textual-debugger/
|
|
21
|
+
- GitHub: https://github.com/AlDanial/tdb
|
|
22
|
+
|
|
23
|
+
MIT License. Copyright 2026 by Al Danial.
|
|
24
|
+
|
|
25
|
+
## Highlights
|
|
26
|
+
|
|
27
|
+
- Debugs synchronous, asynchronous, multi-threaded, and multi-process Python,
|
|
28
|
+
with inspectors for `asyncio` tasks (including a task wait graph), threads,
|
|
29
|
+
and `multiprocessing` / `concurrent.futures` children
|
|
30
|
+
- Attach to a running Python (3.11+), C/C++, Go, Rust, or OCaml program
|
|
31
|
+
by PID, with no preparation
|
|
32
|
+
- Remote attach to Python, Perl, Ruby, Rust, C/C++, and Go programs
|
|
33
|
+
- JSON-RPC server, MCP (v2) server, and a `SKILL.md` for headless and
|
|
34
|
+
AI-assisted debugging
|
|
35
|
+
- Can run the debuggee in an external terminal to debug TUI applications
|
|
36
|
+
- Post-mortem exception hook and live breakpoint hooks (`tdb.breakpoint()` and
|
|
37
|
+
its counterparts in Perl, Ruby, Go, C/C++/Fortran, Rust, and OCaml)
|
|
38
|
+
- `pytest --pdbcls=tdb.pytest_debugger:Debugger` integration
|
|
39
|
+
- Run mode (`--run`) to attach the TUI to a running job on Ctrl-C, and eval
|
|
40
|
+
mode (`--eval`) to print expressions at chosen lines without the TUI
|
|
41
|
+
- Entirely keyboard-driven, with vim, emacs, and Notepad-style keybindings;
|
|
42
|
+
mouse support in graphical environments
|
|
43
|
+
|
|
44
|
+
## Gallery
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/async_breakpoint.png" alt="at breakpoint" width="300">
|
|
48
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/async_task_graph.png" alt="task graph" width="300">
|
|
49
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/multiprocessing_process_3.png" alt="multiple processes" width="300">
|
|
50
|
+
<img src="https://raw.githubusercontent.com/AlDanial/tdb/main/gallery/threading_list.png" alt="thread list" width="300">
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
Videos:
|
|
54
|
+
- [tdb basics](https://youtu.be/2_qf2WZDHuA) views, keybindings, breakpoints, stepping, variable modification, call stack
|
|
55
|
+
- [asyncio tasks](https://youtu.be/vM4tODuqMGg) inspect asyncio tasks and their wait graph; code mod to allow pause
|
|
56
|
+
- [threads and processes](https://youtu.be/J8LOARLs2oQ) inspect variables and call stacks in multiple threads and processes
|
|
57
|
+
- [external terminal](https://youtu.be/121aihjAQ8g) run the debuggee in a separate terminal--ideal for debugging TUI applications
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
uv pip install textual-debugger # or: pip install textual-debugger
|
|
63
|
+
uvx --from textual-debugger tdb my_program.py # run without installing
|
|
64
|
+
pip install "textual-debugger[mcp]" # add the optional MCP server
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
tdb --doc # full documentation in a terminal Markdown viewer
|
|
71
|
+
tdb --info # versions and locations of tdb, its config, and every debugger it would use
|
|
72
|
+
tdb my_program.py arg1 arg2 # debug a Python program (stops at the first line)
|
|
73
|
+
tdb -k 20 -k module.py:14 my_program.py # run to breakpoints
|
|
74
|
+
tdb -k module.py:27 --if "a > 7" my_program.py # ... stopping only when a > 7
|
|
75
|
+
tdb ./myprog # debug a native executable built with -g
|
|
76
|
+
tdb script.pl # ... or a Perl, Bash, Tcsh, Ruby, PowerShell script
|
|
77
|
+
tdb -a 12345 # attach to a running Python program by PID
|
|
78
|
+
tdb -r remotehost:5678 # attach to a remote debugpy server
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
See the [Quick Start](https://textual-debugger.readthedocs.io/quickstart/)
|
|
82
|
+
page for many more examples, and the
|
|
83
|
+
[CLI Reference](https://textual-debugger.readthedocs.io/reference/cli/)
|
|
84
|
+
for every option.
|
|
85
|
+
|
|
86
|
+
## Function Tracing
|
|
87
|
+
|
|
88
|
+
`tdb --trace` records calls to the functions you name in a Python program and
|
|
89
|
+
every process it starts, with no breakpoints and no TUI, and writes a
|
|
90
|
+
[Perfetto](https://ui.perfetto.dev) trace with one lane per thread and per
|
|
91
|
+
`asyncio` task. `--trace-merge` weaves the traces of several services into one
|
|
92
|
+
timeline, and `--trace-discover` writes a starter spec.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
tdb --trace checkout.yaml --trace-name orders orders_service.py -- --port 8002
|
|
96
|
+
tdb --trace-merge inv.jsonl ord.jsonl --trace-out all # open all.perfetto.json in ui.perfetto.dev
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
See [Function Tracing](https://textual-debugger.readthedocs.io/python/tracing/)
|
|
100
|
+
for the spec format, a two-service walkthrough, and the limitations.
|
|
101
|
+
|
|
102
|
+
## Acknowledgments
|
|
103
|
+
|
|
104
|
+
`tdb` is built with Will McGugan's [textual](https://github.com/Textualize/textual)
|
|
105
|
+
and Microsoft's [debugpy](https://github.com/microsoft/debugpy), and was
|
|
106
|
+
inspired by Andreas Klöckner's [pudb](https://pypi.org/project/pudb/).
|
|
107
|
+
See [About](https://textual-debugger.readthedocs.io/about/) for the full
|
|
108
|
+
acknowledgments.
|
|
@@ -23,10 +23,12 @@
|
|
|
23
23
|
]
|
|
24
24
|
dependencies = [
|
|
25
25
|
"textual>=8.0.0",
|
|
26
|
-
"debugpy>=1.8.
|
|
26
|
+
"debugpy>=1.8.20",
|
|
27
27
|
"pygments>=2.17.0",
|
|
28
28
|
"fastapi>=0.115.0",
|
|
29
29
|
"uvicorn>=0.30.0",
|
|
30
|
+
"prompt_toolkit>=3.0.52,<3.1",
|
|
31
|
+
"pyyaml>=6.0",
|
|
30
32
|
]
|
|
31
33
|
|
|
32
34
|
# extras needed to run the examples and tests
|
|
@@ -62,11 +64,20 @@
|
|
|
62
64
|
[tool.setuptools.packages.find]
|
|
63
65
|
where = ["src"]
|
|
64
66
|
include = ["tdb", "tdb.*"]
|
|
65
|
-
# examples/
|
|
66
|
-
exclude = ["tdb.examples", "tdb.examples.*"]
|
|
67
|
+
# examples/ and docs/ are package data (see below), not importable modules.
|
|
68
|
+
exclude = ["tdb.examples", "tdb.examples.*", "tdb.docs", "tdb.docs.*"]
|
|
67
69
|
|
|
68
70
|
[tool.setuptools.package-data]
|
|
69
|
-
tdb = [
|
|
71
|
+
tdb = [
|
|
72
|
+
# Documentation pages shown by `tdb --doc` / `--doc-text` (tdb.documentation).
|
|
73
|
+
# src/tdb/docs and src/tdb/mkdocs.yml are symlinks to the repository's
|
|
74
|
+
# docs/ and mkdocs.yml; per-directory globs keep docs/superpowers/ out.
|
|
75
|
+
"mkdocs.yml", "docs/*.md", "docs/languages/*.md", "docs/using/*.md",
|
|
76
|
+
"docs/python/*.md", "docs/automation/*.md", "docs/reference/*.md",
|
|
77
|
+
# The tracing agent: two stdlib-only files, no __init__.py, loaded by
|
|
78
|
+
# path through PYTHONPATH in the traced program, never imported as tdb.
|
|
79
|
+
"trace/agent/*.py",
|
|
80
|
+
"adapters/perl/helpers.pl", "adapters/perl/padwalker_src/PadWalker.pm", "adapters/perl/padwalker_src/PadWalker.xs", "adapters/perl/padwalker_src/Makefile.PL", "adapters/perl/Devel/TdbRemote.pm", "adapters/perl/Devel/TdbCompile.pm", "adapters/ruby/tdb.rb", "adapters/ruby/ready/tdb_rdbg_ready.rb", "adapters/bash/tdb_harness.sh", "adapters/powershell/tdb_launch.ps1", "adapters/native/tdb.h", "rust_concurrency/probes/gdb_script.py", "rust_concurrency/probes/lldb_script.py",
|
|
70
81
|
# Per-language examples, shown by `tdb --info` ("examples dir").
|
|
71
82
|
# src/tdb/examples is a symlink to the repository's examples/;
|
|
72
83
|
# extension globs keep build outputs (Rust target/, binaries) out.
|
|
@@ -74,6 +85,7 @@
|
|
|
74
85
|
"examples/Go/*.go", "examples/Go/breakpoint_hook_demo/go.mod",
|
|
75
86
|
"examples/Go/breakpoint_hook_demo/*.go", "examples/OCaml/*.ml",
|
|
76
87
|
"examples/Perl/*.pl", "examples/PowerShell/*.ps1", "examples/Python/*.py",
|
|
88
|
+
"examples/Python/trace/*.py", "examples/Python/trace/*.yaml",
|
|
77
89
|
"examples/Ruby/*.rb", "examples/Rust/*.rs",
|
|
78
90
|
"examples/Rust/breakpoint_hook_demo/Cargo.toml",
|
|
79
91
|
"examples/Rust/breakpoint_hook_demo/src/*.rs", "examples/bash/*.sh",
|
|
@@ -104,3 +116,8 @@
|
|
|
104
116
|
]
|
|
105
117
|
show_missing = true
|
|
106
118
|
skip_covered = false
|
|
119
|
+
|
|
120
|
+
[dependency-groups]
|
|
121
|
+
dev = [
|
|
122
|
+
"pytest-xdist>=3.8.0",
|
|
123
|
+
]
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Owned process groups: stop a child tdb started in its own session
|
|
2
|
+
together with everything it started, with every wait bounded.
|
|
3
|
+
|
|
4
|
+
A backend that spawns its debugger with ``start_new_session=True`` owns
|
|
5
|
+
that whole process group. Checking only the leader is not enough: the
|
|
6
|
+
leader (rdbg, pwsh, perl) can exit while the debuggee or a helper it
|
|
7
|
+
started lives on holding our pipes, and asyncio's ``Process.wait()``
|
|
8
|
+
waits for those pipes too. So the group is signalled by its id whether
|
|
9
|
+
or not the leader has exited (ESRCH just means it is already empty),
|
|
10
|
+
and each wait has a deadline before escalating to SIGKILL.
|
|
11
|
+
|
|
12
|
+
Windows has no process groups to signal; there the leader alone is
|
|
13
|
+
terminated and then killed, as before.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import asyncio
|
|
19
|
+
import contextlib
|
|
20
|
+
import logging
|
|
21
|
+
import os
|
|
22
|
+
import signal
|
|
23
|
+
|
|
24
|
+
log = logging.getLogger(__name__)
|
|
25
|
+
|
|
26
|
+
_POLL = 0.05
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def signal_group(proc: asyncio.subprocess.Process, sig: int) -> None:
|
|
30
|
+
"""Send `sig` to `proc`'s whole process group (POSIX), or to `proc`
|
|
31
|
+
alone on Windows. Never raises for an already-gone target."""
|
|
32
|
+
if os.name == "nt":
|
|
33
|
+
if proc.returncode is None:
|
|
34
|
+
with contextlib.suppress(ProcessLookupError, OSError):
|
|
35
|
+
if sig == signal.SIGTERM:
|
|
36
|
+
proc.terminate()
|
|
37
|
+
else:
|
|
38
|
+
proc.kill()
|
|
39
|
+
return
|
|
40
|
+
with contextlib.suppress(ProcessLookupError, PermissionError, OSError):
|
|
41
|
+
os.killpg(proc.pid, sig)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _group_alive(pgid: int) -> bool:
|
|
45
|
+
if os.name == "nt":
|
|
46
|
+
return False
|
|
47
|
+
try:
|
|
48
|
+
os.killpg(pgid, 0)
|
|
49
|
+
except ProcessLookupError:
|
|
50
|
+
return False
|
|
51
|
+
except (PermissionError, OSError):
|
|
52
|
+
return True
|
|
53
|
+
return True
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
async def _settle(proc: asyncio.subprocess.Process, timeout: float) -> bool:
|
|
57
|
+
"""Wait up to `timeout` for the leader to be reaped and the group to
|
|
58
|
+
empty. True when both happened."""
|
|
59
|
+
loop = asyncio.get_running_loop()
|
|
60
|
+
deadline = loop.time() + timeout
|
|
61
|
+
with contextlib.suppress(asyncio.TimeoutError):
|
|
62
|
+
await asyncio.wait_for(proc.wait(), max(timeout, 0))
|
|
63
|
+
while _group_alive(proc.pid):
|
|
64
|
+
remaining = deadline - loop.time()
|
|
65
|
+
if remaining <= 0:
|
|
66
|
+
return False
|
|
67
|
+
await asyncio.sleep(min(_POLL, remaining))
|
|
68
|
+
if proc.returncode is None:
|
|
69
|
+
# Group is empty, so only the pipes are left: a bounded last look.
|
|
70
|
+
with contextlib.suppress(asyncio.TimeoutError):
|
|
71
|
+
await asyncio.wait_for(proc.wait(), max(deadline - loop.time(), _POLL))
|
|
72
|
+
return proc.returncode is not None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
async def stop_group(
|
|
76
|
+
proc: asyncio.subprocess.Process, *, grace: float = 2.0, kill_grace: float = 2.0
|
|
77
|
+
) -> None:
|
|
78
|
+
"""SIGTERM `proc`'s group, give it `grace` seconds, then SIGKILL what
|
|
79
|
+
is left and wait at most `kill_grace` more. Never raises, never
|
|
80
|
+
waits longer than ``grace + kill_grace`` (plus polling slack)."""
|
|
81
|
+
if os.name == "nt" and proc.returncode is not None:
|
|
82
|
+
return
|
|
83
|
+
signal_group(proc, signal.SIGTERM)
|
|
84
|
+
if await _settle(proc, grace):
|
|
85
|
+
return
|
|
86
|
+
signal_group(proc, signal.SIGKILL)
|
|
87
|
+
if not await _settle(proc, kill_grace):
|
|
88
|
+
log.warning(
|
|
89
|
+
"process group %s still not gone %.1fs after SIGKILL", proc.pid, kill_grace
|
|
90
|
+
)
|
|
@@ -60,6 +60,10 @@ ADAPTER_LISTEN = 15.0
|
|
|
60
60
|
ADAPTER_EXIT_GRACE = 2.0
|
|
61
61
|
"""Timeout for spawn_tcp adapter to announce its listening port."""
|
|
62
62
|
|
|
63
|
+
# How long a stopping adapter gets to exit after SIGTERM, then again after
|
|
64
|
+
# SIGKILL. A wedged gdb takes SIGTERM and never acts on it.
|
|
65
|
+
ADAPTER_STOP_GRACE = 5.0
|
|
66
|
+
|
|
63
67
|
# Run-mode examine reads each child process's threads and stacks in
|
|
64
68
|
# turn. A child that is mid-fork or wedged in native code can leave
|
|
65
69
|
# `threads` unanswered; bound it so one slow child can't stall the
|
|
@@ -75,3 +79,23 @@ EXAMINE_CHILD = 2.0
|
|
|
75
79
|
# arbitrary-but-comfortable for typical interactive sessions.
|
|
76
80
|
RPC_STEP_WAIT = 600.0
|
|
77
81
|
"""How long the RPC `_step_action` blocks awaiting the next stop."""
|
|
82
|
+
|
|
83
|
+
# `tdb -a PID` on Python. `sys.remote_exec` reports success as soon as the
|
|
84
|
+
# script is queued, and the script never runs while the main thread is
|
|
85
|
+
# blocked, so tdb waits this long for it to connect and then falls back.
|
|
86
|
+
# The slowest success measured was 3.9s, behind a C call holding the GIL.
|
|
87
|
+
PID_ATTACH_REMOTE_EXEC = 5.0
|
|
88
|
+
# How long the adapter gets to start listening before tdb gives up without
|
|
89
|
+
# injecting anything.
|
|
90
|
+
PID_ATTACH_LISTEN = 10.0
|
|
91
|
+
# Ceiling for injection as a whole, whichever method is used.
|
|
92
|
+
PID_ATTACH_TOTAL = 30.0
|
|
93
|
+
# Quitting mid-injection first lets the handshake finish, for this long:
|
|
94
|
+
# pydevd waits for it forever if the adapter goes away.
|
|
95
|
+
PID_ATTACH_QUIT = 5.0
|
|
96
|
+
# An injected target must answer `threads` within this; if it can't, no
|
|
97
|
+
# later request will get a reply either.
|
|
98
|
+
PID_ATTACH_RESPONSE = 5.0
|
|
99
|
+
# With no stop by this long after attaching, the program isn't running
|
|
100
|
+
# Python code and a pause can't land; the TUI says so.
|
|
101
|
+
PID_ATTACH_BLOCKED_NOTICE = 3.0
|
|
@@ -490,3 +490,20 @@ class BashDapServer:
|
|
|
490
490
|
self.send_error(request, str(e))
|
|
491
491
|
return
|
|
492
492
|
self.send_response(request)
|
|
493
|
+
|
|
494
|
+
# ---- Ctrl-C after detach (tdb-private request) ----
|
|
495
|
+
async def _on_tdbSignal(self, request: Request) -> None:
|
|
496
|
+
# Like tdbStdin, not gated on "stopped": the script is running.
|
|
497
|
+
name = request.arguments.get("signal")
|
|
498
|
+
if name != "SIGINT":
|
|
499
|
+
self.send_error(request, f"unsupported signal: {name!r}")
|
|
500
|
+
return
|
|
501
|
+
if self.session is None:
|
|
502
|
+
self.send_error(request, "no debuggee to signal: no launch yet")
|
|
503
|
+
return
|
|
504
|
+
try:
|
|
505
|
+
self.session.send_sigint()
|
|
506
|
+
except BashProtocolError as e:
|
|
507
|
+
self.send_error(request, str(e))
|
|
508
|
+
return
|
|
509
|
+
self.send_response(request)
|
|
@@ -542,6 +542,28 @@ class BashSession:
|
|
|
542
542
|
self.stopped = False
|
|
543
543
|
self._write_line(mode)
|
|
544
544
|
|
|
545
|
+
def send_sigint(self) -> None:
|
|
546
|
+
"""Deliver SIGINT to the script the way a terminal Ctrl-C would.
|
|
547
|
+
|
|
548
|
+
Launched in-process: the whole process group (bash + children), the
|
|
549
|
+
same addressing stop() uses. --terminal mode: the debuggee is not
|
|
550
|
+
our child and shares the emulator's group, so signal its pid only.
|
|
551
|
+
Raises BashProtocolError when there is nothing to signal.
|
|
552
|
+
"""
|
|
553
|
+
try:
|
|
554
|
+
if self._process is not None:
|
|
555
|
+
if self._process.returncode is not None:
|
|
556
|
+
raise BashProtocolError("the script has already exited")
|
|
557
|
+
os.killpg(self._process.pid, signal.SIGINT)
|
|
558
|
+
elif self.debuggee_pid is not None and self.debuggee_pid > 1:
|
|
559
|
+
# Never 0 / 1: os.kill(0|1, ...) would hit tdb's own group
|
|
560
|
+
# or init.
|
|
561
|
+
os.kill(self.debuggee_pid, signal.SIGINT)
|
|
562
|
+
else:
|
|
563
|
+
raise BashProtocolError("no debuggee to signal")
|
|
564
|
+
except (ProcessLookupError, PermissionError) as e:
|
|
565
|
+
raise BashProtocolError(f"cannot signal the script: {e}") from e
|
|
566
|
+
|
|
545
567
|
async def stop(self) -> None:
|
|
546
568
|
for t in self._tasks:
|
|
547
569
|
t.cancel()
|
|
@@ -51,7 +51,19 @@ BEGIN {
|
|
|
51
51
|
$^P = 0x73f unless $^P & 0x02;
|
|
52
52
|
unless ( defined &DB::DB ) {
|
|
53
53
|
package DB;
|
|
54
|
+
# perl5db runs any .perldb in the current directory; see
|
|
55
|
+
# PERL5DB_FROM_ROOT in session.py.
|
|
56
|
+
require Cwd;
|
|
57
|
+
my ($here) = ( Cwd::getcwd() // '' ) =~ /\A(.*)\z/s; # Untainted.
|
|
58
|
+
opendir( my $back, '.' );
|
|
59
|
+
my $can_return = length $here || $back;
|
|
60
|
+
chdir '/' if $can_return;
|
|
54
61
|
require 'perl5db.pl';
|
|
62
|
+
if ($can_return) {
|
|
63
|
+
( length $here && chdir $here )
|
|
64
|
+
or eval { $back && chdir $back }
|
|
65
|
+
or warn "Devel::TdbRemote: cannot return to $here: $!\n";
|
|
66
|
+
}
|
|
55
67
|
}
|
|
56
68
|
}
|
|
57
69
|
|