2 Commits
Author SHA1 Message Date
swaits 20dec9bc7b chore: release 0.2.2
Bug-fix release: Python program output now shows in the Console pane, and
breakpoints restore for files opened on the command line.

### Fixed

- **Python `print()` output appears in the Console pane.** The debugpy
  launch config now sets `console = "integratedTerminal"`, so debugpy
  routes stdout/stderr via `RunInTerminalRequest` into dapui's Console
  buffer (which is already registered as
  `dap.defaults.fallback.terminal_win_cmd`). Previously debugpy defaulted
  to `internalConsole` and emitted `OutputEvent`s that nvim-dap forwards
  to the REPL buffer — which turbo-debug's layout deliberately omits, so
  program output vanished. Interactive `input()` now also works.
- **Breakpoints restore for files opened on the command line.** `nvim
  foo.py` fires `BufReadPost` for `foo.py` before turbo-debug's deferred
  `setup()` runs, so `persistent-breakpoints.nvim`'s `BufReadPost`
  autocmd missed the startup buffer and saved breakpoints never came
  back. After setup, turbo-debug now sweeps already-loaded buffers once
  via `load_breakpoints()` (idempotent; placed after `sign_define` so
  the first paint uses turbo-debug's emoji signs instead of dap's
  default `B`).
2026-04-12 21:44:54 -06:00
swaits 5118c03f83 fix: python console output and startup breakpoint restoration
adapters/python: set `console = "integratedTerminal"` so debugpy routes stdout/stderr via RunInTerminalRequest into dapui's Console pane. Under the default (internalConsole), debugpy emits DAP OutputEvents that nvim-dap forwards to the REPL buffer — which turbo-debug's layout deliberately omits, so print() output vanished.

breakpoints: sweep already-loaded buffers with load_breakpoints() right after sign_define. plugin/turbo-debug.lua defers setup via vim.schedule so deps register first, which means BufReadPost has already fired for any file opened on the command line — persistent-breakpoints' autocmd misses it. The one-shot sweep is idempotent; placing it after sign_define avoids a first-paint flicker of dap's default 'B' sign.
2026-04-12 21:35:50 -06:00
3 changed files with 42 additions and 0 deletions

No files matched your search

+24
View File
@@ -1,5 +1,29 @@
# Changelog # Changelog
## 0.2.2 — 2026-04-12
Bug-fix release: Python program output now shows in the Console pane, and
breakpoints restore for files opened on the command line.
### Fixed
- **Python `print()` output appears in the Console pane.** The debugpy
launch config now sets `console = "integratedTerminal"`, so debugpy
routes stdout/stderr via `RunInTerminalRequest` into dapui's Console
buffer (which is already registered as
`dap.defaults.fallback.terminal_win_cmd`). Previously debugpy defaulted
to `internalConsole` and emitted `OutputEvent`s that nvim-dap forwards
to the REPL buffer — which turbo-debug's layout deliberately omits, so
program output vanished. Interactive `input()` now also works.
- **Breakpoints restore for files opened on the command line.** `nvim
foo.py` fires `BufReadPost` for `foo.py` before turbo-debug's deferred
`setup()` runs, so `persistent-breakpoints.nvim`'s `BufReadPost`
autocmd missed the startup buffer and saved breakpoints never came
back. After setup, turbo-debug now sweeps already-loaded buffers once
via `load_breakpoints()` (idempotent; placed after `sign_define` so
the first paint uses turbo-debug's emoji signs instead of dap's
default `B`).
## 0.2.1 — 2026-04-12 ## 0.2.1 — 2026-04-12
Language coverage release. 10 new DAP adapters bring built-in support from Language coverage release. 10 new DAP adapters bring built-in support from
+8
View File
@@ -36,6 +36,14 @@ function M.register(dap)
name = "Launch file", name = "Launch file",
program = "${file}", program = "${file}",
pythonPath = function() return find_python() end, pythonPath = function() return find_python() end,
-- integratedTerminal routes the program via RunInTerminalRequest,
-- which nvim-dap spawns in a terminal buffer. dapui registers its
-- Console element as `dap.defaults.fallback.terminal_win_cmd`, so
-- stdout/stderr land in the visible Console pane. Default
-- (internalConsole) sends OutputEvents that nvim-dap routes to the
-- REPL buffer — which turbo-debug's layout deliberately omits, so
-- print() output vanishes. `input()` also works under this mode.
console = "integratedTerminal",
}, },
}, { "python" }) }, { "python" })
end end
+10
View File
@@ -61,6 +61,16 @@ function M.setup()
vim.fn.sign_define(s[1], spec) vim.fn.sign_define(s[1], spec)
end end
-- persistent-breakpoints.setup() only installs its BufReadPost autocmd —
-- for files opened from the command line (`nvim foo.py`), BufReadPost has
-- already fired before our deferred plugin/turbo-debug.lua setup runs, so
-- the autocmd misses the startup buffer and saved breakpoints never
-- reappear. load_breakpoints() iterates all listed buffers and is
-- idempotent, so one post-sign_define sweep catches the missed ones
-- without a flicker of dap's default 'B' sign. Placed after sign_define
-- so the restored breakpoints render with our emoji from the first paint.
pcall(require("persistent-breakpoints.api").load_breakpoints)
-- unobtrusive inline virtual text: italic, comment-colored -- unobtrusive inline virtual text: italic, comment-colored
vim.api.nvim_set_hl(0, "NvimDapVirtualText", { default = true, link = "Comment", italic = true }) vim.api.nvim_set_hl(0, "NvimDapVirtualText", { default = true, link = "Comment", italic = true })
vim.api.nvim_set_hl(0, "NvimDapVirtualTextChanged", { default = true, link = "DiagnosticWarn", italic = true }) vim.api.nvim_set_hl(0, "NvimDapVirtualTextChanged", { default = true, link = "DiagnosticWarn", italic = true })