Rename from tiny-debugger to turbo-debug — inspired by Turbo Pascal, the first IDE with a real visual debugger. This thing isn't tiny, it's turbo charged. CHANGELOG for 0.1.0: Features: - Zero-config debugging — one line install, everything works - Modal keybindings (c/s/d/r/q/x/X/D/W/K/E/R/?), active only during debug mode, cleanly removed on exit - Persistent breakpoints via persistent-breakpoints.nvim - Inline virtual text — variable values in source code - Hover (K), watch (W), REPL eval (E) from the code window - Help splash (3s auto-dismiss) + manual help (?) - Debug mode chrome — winbar indicator, cursor highlight - dapui integration — controls toolbar, labeled panels - which-key support — <leader>d debug group auto-registered - quit_exits_mode option Adapters (12 languages): - Python (debugpy + venv detection) - Rust (codelldb + cargo build + vim.ui.select picker) - Go (delve), C/C++/Swift (codelldb) - JavaScript/TypeScript (js-debug-adapter) - C# (netcoredbg), Java, Kotlin, PHP, Ruby, Lua (osv) Keybindings: - <leader>dd — toggle debug mode - <leader>dx / <leader>dX / <leader>dD — breakpoints (always) - c s d r C x X D W K E q R ? — modal (debug mode only)
43 lines
889 B
Lua
43 lines
889 B
Lua
local loader = require("turbo-debug.adapters.init")
|
|
|
|
local M = {}
|
|
|
|
function M.register(dap)
|
|
local js_debug = loader.find_executable({ "js-debug-adapter" })
|
|
if not js_debug then return end
|
|
|
|
local adapter = {
|
|
type = "server",
|
|
port = "${port}",
|
|
executable = {
|
|
command = js_debug,
|
|
args = { "${port}" },
|
|
},
|
|
}
|
|
|
|
local configurations = {
|
|
{
|
|
type = "pwa-node",
|
|
request = "launch",
|
|
name = "Launch file",
|
|
program = "${file}",
|
|
cwd = "${workspaceFolder}",
|
|
},
|
|
{
|
|
type = "pwa-node",
|
|
request = "attach",
|
|
name = "Attach",
|
|
processId = function()
|
|
return require("dap.utils").pick_process()
|
|
end,
|
|
cwd = "${workspaceFolder}",
|
|
},
|
|
}
|
|
|
|
loader.register(dap, "pwa-node", adapter, configurations, {
|
|
"javascript", "typescript", "javascriptreact", "typescriptreact",
|
|
})
|
|
end
|
|
|
|
return M
|