Skip to content

v0.6.3 — Python TCP attach + DAP refactor

Latest

Choose a tag to compare

@waltoss waltoss released this 28 Apr 09:51
· 48 commits to main since this release
95ade65

What's new

dbg attach <port> --runtime python actually works now

Previously dbg attach <port> --runtime python was broken: it spawned a second debugpy.adapter process and asked that adapter to attach — adapter-on-top-of-adapter, which exited immediately with DAP adapter process terminated.

Now dbg connects directly over TCP to the debugpy listener:

# Start your app under debugpy
python -m debugpy --listen 5678 -m uvicorn myapp:app

# From another terminal — attaches over TCP, no second adapter spawned
dbg attach 5678 --runtime python

Internal: DAP transport + connector strategies

The DAP layer was refactored to separate two orthogonal concerns:

  • Transport — how bytes flow (StdioTransport vs TcpTransport)
  • Provisioning — how we obtain a DAP endpoint (SpawnAdapterConnector vs TcpAttachConnector)

Each DapRuntimeConfig now declares its connector for launch and (optionally) attach. Adding new DAP runtimes (Go via delve, Ruby via rdbg) is now a config-file change, not a DapClient change.

Other code-quality improvements in src/dap/:

  • DapClient.send is strongly typed via a command map derived from @vscode/debugprotocol
  • DAP messages are zod-validated on the wire (no more as casts in handleMessage)
  • SessionCapabilities → SessionFeatures (avoids name collision with DAP's DebugProtocol.Capabilities)
  • _runtime narrows to a zod-derived CanonicalRuntime union

Bug fixes

  • Fix break-rm for function breakpoints — function breakpoints are now stored alongside file breakpoints in the unified breakpoints array (#10 / #11).

Install

bun install --global debug-that@0.6.3
# or
npx debug-that@0.6.3

🤖 Release notes generated with Claude Code