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.
This commit is contained in:
2 files changed
+18
No files matched your search
@@ -36,6 +36,14 @@ function M.register(dap)
|
||||
name = "Launch file",
|
||||
program = "${file}",
|
||||
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" })
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user