textual-debugger 0.1.4__tar.gz → 0.1.5__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.
Files changed (72) hide show
  1. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/PKG-INFO +17 -2
  2. {textual_debugger-0.1.4/src/tdb → textual_debugger-0.1.5}/README.md +16 -1
  3. {textual_debugger-0.1.4 → textual_debugger-0.1.5/src/tdb}/README.md +16 -1
  4. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/__init__.py +1 -1
  5. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/source_analysis.py +20 -4
  6. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/textual_debugger.egg-info/PKG-INFO +17 -2
  7. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/LICENSE +0 -0
  8. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/pyproject.toml +0 -0
  9. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/setup.cfg +0 -0
  10. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/__main__.py +0 -0
  11. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/_timeouts.py +0 -0
  12. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app.py +0 -0
  13. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app_handlers/__init__.py +0 -0
  14. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app_handlers/dap_events.py +0 -0
  15. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app_handlers/inspection.py +0 -0
  16. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app_handlers/routing.py +0 -0
  17. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app_handlers/ui_panels.py +0 -0
  18. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/app_helpers.py +0 -0
  19. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/breakpoint_hook.py +0 -0
  20. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/cli.py +0 -0
  21. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/dap/__init__.py +0 -0
  22. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/dap/client.py +0 -0
  23. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/dap/messages.py +0 -0
  24. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/dap/protocol.py +0 -0
  25. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/dap/types.py +0 -0
  26. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/inspection.py +0 -0
  27. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/inspection_full.py +0 -0
  28. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/keybindings/__init__.py +0 -0
  29. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/mcp/__init__.py +0 -0
  30. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/mcp/__main__.py +0 -0
  31. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/mcp/server.py +0 -0
  32. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/mcp/session.py +0 -0
  33. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/persist.py +0 -0
  34. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/post_mortem.py +0 -0
  35. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/processes_cache.py +0 -0
  36. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/server/__init__.py +0 -0
  37. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/server/app.py +0 -0
  38. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/server/event_handler.py +0 -0
  39. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/server/handlers.py +0 -0
  40. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/server/rpc_types.py +0 -0
  41. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/server/runner.py +0 -0
  42. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/__init__.py +0 -0
  43. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/child_processes.py +0 -0
  44. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/controller.py +0 -0
  45. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/event_bus.py +0 -0
  46. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/inspect_service.py +0 -0
  47. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/messages.py +0 -0
  48. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/post_mortem_loader.py +0 -0
  49. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/state.py +0 -0
  50. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/statement_stepper.py +0 -0
  51. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/terminal.py +0 -0
  52. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/session/textual_handler.py +0 -0
  53. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/__init__.py +0 -0
  54. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/_inspection_modal.py +0 -0
  55. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/async_tasks_modal.py +0 -0
  56. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/breakpoint_view.py +0 -0
  57. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/code_view.py +0 -0
  58. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/console_view.py +0 -0
  59. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/evaluate_console.py +0 -0
  60. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/full_contents_modal.py +0 -0
  61. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/menu_bar.py +0 -0
  62. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/modals.py +0 -0
  63. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/processes_modal.py +0 -0
  64. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/stack_view.py +0 -0
  65. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/status_bar.py +0 -0
  66. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/threads_modal.py +0 -0
  67. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/tdb/widgets/variable_view.py +0 -0
  68. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/textual_debugger.egg-info/SOURCES.txt +0 -0
  69. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/textual_debugger.egg-info/dependency_links.txt +0 -0
  70. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/textual_debugger.egg-info/entry_points.txt +0 -0
  71. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/textual_debugger.egg-info/requires.txt +0 -0
  72. {textual_debugger-0.1.4 → textual_debugger-0.1.5}/src/textual_debugger.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: textual-debugger
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A TUI Python debugger based on textual and debugpy
5
5
  Author-email: Al Danial <al.danial@gmail.com>
6
6
  License: textual-debugger is licensed to you under the MIT/X Consortium license:
@@ -91,7 +91,8 @@ It specifically supports modules
91
91
 
92
92
  - supports remote attachment to debugpy-enabled Python programs
93
93
 
94
- - includes a JSON-RPC server mode that enables programmatic debug control, making it suitable for
94
+ - includes a JSON-RPC server mode, an MCP mode, and a `SKILL.md` file that enable
95
+ programmatic debug control, making it suitable for
95
96
  automated, headless debugging workflows and AI-assisted debugging
96
97
 
97
98
  - can spawn the debuggee in an external terminal to enable debugging TUI applications
@@ -120,6 +121,9 @@ as open source.
120
121
  [Claude for Open Source](https://claude.com/contact-sales/claude-for-oss) program.
121
122
  `tdb` was made almost entirely with Claude Code.
122
123
 
124
+ - OpenAI, for providing access to Codex through the
125
+ [Codex for Open Source](https://developers.openai.com/community/codex-for-oss) program.
126
+
123
127
  ## Gallery
124
128
  <p align="center">
125
129
  <img src="https://github.com/AlDanial/tdb/blob/main/gallery/async_breakpoint.png" alt="at breakpoint" width="300">
@@ -442,6 +446,17 @@ Snapshot depth / breadth is capped (5 levels, 50 children per container) to keep
442
446
  capture cheap even for pathological object graphs; cycles are handled via identity
443
447
  memoization.
444
448
 
449
+ ### Post-Mortem within a Docker Container
450
+
451
+ The `textual-debugger` GitHub repository's `examples/` directory has three files
452
+ that show how to run a `tdb`-enabled Python program under `tmux` in a Docker
453
+ container so that you can attach to the container and inspect the program
454
+ in `tdb` post-mortem analysis mode if the program hits an unhandled exception:
455
+
456
+ - [post_mortem_example.py](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_example.py)
457
+ - [post_mortem_entrypoint.sh](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_entrypoint.sh)
458
+ - [Dockerfile.post_mortem](https://github.com/AlDanial/tdb/blob/main/examples/Dockerfile.post_mortem)
459
+
445
460
  ### Live Breakpoint Hook
446
461
 
447
462
  `tdb` has an improved implemenation of the standard `breakpoint()` function (or equivalently,
@@ -25,7 +25,8 @@ It specifically supports modules
25
25
 
26
26
  - supports remote attachment to debugpy-enabled Python programs
27
27
 
28
- - includes a JSON-RPC server mode that enables programmatic debug control, making it suitable for
28
+ - includes a JSON-RPC server mode, an MCP mode, and a `SKILL.md` file that enable
29
+ programmatic debug control, making it suitable for
29
30
  automated, headless debugging workflows and AI-assisted debugging
30
31
 
31
32
  - can spawn the debuggee in an external terminal to enable debugging TUI applications
@@ -54,6 +55,9 @@ as open source.
54
55
  [Claude for Open Source](https://claude.com/contact-sales/claude-for-oss) program.
55
56
  `tdb` was made almost entirely with Claude Code.
56
57
 
58
+ - OpenAI, for providing access to Codex through the
59
+ [Codex for Open Source](https://developers.openai.com/community/codex-for-oss) program.
60
+
57
61
  ## Gallery
58
62
  <p align="center">
59
63
  <img src="https://github.com/AlDanial/tdb/blob/main/gallery/async_breakpoint.png" alt="at breakpoint" width="300">
@@ -376,6 +380,17 @@ Snapshot depth / breadth is capped (5 levels, 50 children per container) to keep
376
380
  capture cheap even for pathological object graphs; cycles are handled via identity
377
381
  memoization.
378
382
 
383
+ ### Post-Mortem within a Docker Container
384
+
385
+ The `textual-debugger` GitHub repository's `examples/` directory has three files
386
+ that show how to run a `tdb`-enabled Python program under `tmux` in a Docker
387
+ container so that you can attach to the container and inspect the program
388
+ in `tdb` post-mortem analysis mode if the program hits an unhandled exception:
389
+
390
+ - [post_mortem_example.py](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_example.py)
391
+ - [post_mortem_entrypoint.sh](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_entrypoint.sh)
392
+ - [Dockerfile.post_mortem](https://github.com/AlDanial/tdb/blob/main/examples/Dockerfile.post_mortem)
393
+
379
394
  ### Live Breakpoint Hook
380
395
 
381
396
  `tdb` has an improved implemenation of the standard `breakpoint()` function (or equivalently,
@@ -25,7 +25,8 @@ It specifically supports modules
25
25
 
26
26
  - supports remote attachment to debugpy-enabled Python programs
27
27
 
28
- - includes a JSON-RPC server mode that enables programmatic debug control, making it suitable for
28
+ - includes a JSON-RPC server mode, an MCP mode, and a `SKILL.md` file that enable
29
+ programmatic debug control, making it suitable for
29
30
  automated, headless debugging workflows and AI-assisted debugging
30
31
 
31
32
  - can spawn the debuggee in an external terminal to enable debugging TUI applications
@@ -54,6 +55,9 @@ as open source.
54
55
  [Claude for Open Source](https://claude.com/contact-sales/claude-for-oss) program.
55
56
  `tdb` was made almost entirely with Claude Code.
56
57
 
58
+ - OpenAI, for providing access to Codex through the
59
+ [Codex for Open Source](https://developers.openai.com/community/codex-for-oss) program.
60
+
57
61
  ## Gallery
58
62
  <p align="center">
59
63
  <img src="https://github.com/AlDanial/tdb/blob/main/gallery/async_breakpoint.png" alt="at breakpoint" width="300">
@@ -376,6 +380,17 @@ Snapshot depth / breadth is capped (5 levels, 50 children per container) to keep
376
380
  capture cheap even for pathological object graphs; cycles are handled via identity
377
381
  memoization.
378
382
 
383
+ ### Post-Mortem within a Docker Container
384
+
385
+ The `textual-debugger` GitHub repository's `examples/` directory has three files
386
+ that show how to run a `tdb`-enabled Python program under `tmux` in a Docker
387
+ container so that you can attach to the container and inspect the program
388
+ in `tdb` post-mortem analysis mode if the program hits an unhandled exception:
389
+
390
+ - [post_mortem_example.py](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_example.py)
391
+ - [post_mortem_entrypoint.sh](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_entrypoint.sh)
392
+ - [Dockerfile.post_mortem](https://github.com/AlDanial/tdb/blob/main/examples/Dockerfile.post_mortem)
393
+
379
394
  ### Live Breakpoint Hook
380
395
 
381
396
  `tdb` has an improved implemenation of the standard `breakpoint()` function (or equivalently,
@@ -1,6 +1,6 @@
1
1
  from tdb.breakpoint_hook import breakpoint
2
2
  from tdb.post_mortem import exception_hook
3
3
 
4
- __version__ = "0.1.4"
4
+ __version__ = "0.1.5"
5
5
 
6
6
  __all__ = ["breakpoint", "exception_hook"]
@@ -121,8 +121,11 @@ def _walk(node: ast.AST, out: list[tuple[int, int]]) -> None:
121
121
  out.append((dec.lineno, dec.end_lineno or dec.lineno))
122
122
 
123
123
  if isinstance(node, _COMPOUND_STMT_TYPES):
124
- out.append(_header_range(node, node.body))
125
- for sublist in _all_suites(node):
124
+ # ast.Match has no `body` — its suites live in `cases` — so
125
+ # derive the header end from the first suite whatever its name.
126
+ suites = list(_all_suites(node))
127
+ out.append(_header_range(node, suites[0] if suites else []))
128
+ for sublist in suites:
126
129
  for child in sublist:
127
130
  _walk(child, out)
128
131
  elif isinstance(node, ast.ExceptHandler):
@@ -130,7 +133,14 @@ def _walk(node: ast.AST, out: list[tuple[int, int]]) -> None:
130
133
  for child in node.body:
131
134
  _walk(child, out)
132
135
  elif hasattr(ast, "match_case") and isinstance(node, ast.match_case):
133
- out.append(_header_range(node, node.body))
136
+ # match_case carries no lineno of its own — its pattern does.
137
+ # The header is the `case <pattern> [if guard]:` line(s).
138
+ start = node.pattern.lineno
139
+ if node.body:
140
+ end = node.body[0].lineno - 1
141
+ else:
142
+ end = node.pattern.end_lineno or start
143
+ out.append((start, max(start, end)))
134
144
  for child in node.body:
135
145
  _walk(child, out)
136
146
  elif isinstance(node, ast.stmt):
@@ -149,7 +159,13 @@ def _header_range(
149
159
  """
150
160
  start = node.lineno # type: ignore[attr-defined]
151
161
  if body:
152
- end = body[0].lineno - 1 # type: ignore[attr-defined]
162
+ first = body[0]
163
+ # A Match node's first suite is `cases`, whose match_case
164
+ # elements have no lineno; their pattern does.
165
+ first_line = getattr(first, "lineno", None)
166
+ if first_line is None:
167
+ first_line = first.pattern.lineno
168
+ end = first_line - 1
153
169
  else:
154
170
  end = node.end_lineno or start # type: ignore[attr-defined]
155
171
  return (start, max(start, end))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: textual-debugger
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A TUI Python debugger based on textual and debugpy
5
5
  Author-email: Al Danial <al.danial@gmail.com>
6
6
  License: textual-debugger is licensed to you under the MIT/X Consortium license:
@@ -91,7 +91,8 @@ It specifically supports modules
91
91
 
92
92
  - supports remote attachment to debugpy-enabled Python programs
93
93
 
94
- - includes a JSON-RPC server mode that enables programmatic debug control, making it suitable for
94
+ - includes a JSON-RPC server mode, an MCP mode, and a `SKILL.md` file that enable
95
+ programmatic debug control, making it suitable for
95
96
  automated, headless debugging workflows and AI-assisted debugging
96
97
 
97
98
  - can spawn the debuggee in an external terminal to enable debugging TUI applications
@@ -120,6 +121,9 @@ as open source.
120
121
  [Claude for Open Source](https://claude.com/contact-sales/claude-for-oss) program.
121
122
  `tdb` was made almost entirely with Claude Code.
122
123
 
124
+ - OpenAI, for providing access to Codex through the
125
+ [Codex for Open Source](https://developers.openai.com/community/codex-for-oss) program.
126
+
123
127
  ## Gallery
124
128
  <p align="center">
125
129
  <img src="https://github.com/AlDanial/tdb/blob/main/gallery/async_breakpoint.png" alt="at breakpoint" width="300">
@@ -442,6 +446,17 @@ Snapshot depth / breadth is capped (5 levels, 50 children per container) to keep
442
446
  capture cheap even for pathological object graphs; cycles are handled via identity
443
447
  memoization.
444
448
 
449
+ ### Post-Mortem within a Docker Container
450
+
451
+ The `textual-debugger` GitHub repository's `examples/` directory has three files
452
+ that show how to run a `tdb`-enabled Python program under `tmux` in a Docker
453
+ container so that you can attach to the container and inspect the program
454
+ in `tdb` post-mortem analysis mode if the program hits an unhandled exception:
455
+
456
+ - [post_mortem_example.py](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_example.py)
457
+ - [post_mortem_entrypoint.sh](https://github.com/AlDanial/tdb/blob/main/examples/post_mortem_entrypoint.sh)
458
+ - [Dockerfile.post_mortem](https://github.com/AlDanial/tdb/blob/main/examples/Dockerfile.post_mortem)
459
+
445
460
  ### Live Breakpoint Hook
446
461
 
447
462
  `tdb` has an improved implemenation of the standard `breakpoint()` function (or equivalently,