Open timsofteng opened 1 month ago
local dap = require("dap") require("dapui").setup() dap.adapters["pwa-node"] = { type = "server", host = "localhost", port = "${port}", executable = { command = "node", args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}", }, }, } require("dap").configurations.javascript = { { type = "pwa-node", request = "launch", name = "Launch file", program = "${file}", cwd = "${workspaceFolder}", }, } dap.adapters.chrome = { type = "executable", command = "node", -- command = "chrome-debug-adapter", args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" }, -- TODO adjust } dap.configurations.typescriptreact = { { type = "chrome", request = "attach", program = "${file}", cwd = vim.fn.getcwd(), sourceMaps = true, protocol = "inspector", port = 9222, webRoot = "${workspaceFolder}", }, } dap.configurations.javascriptreact = { { type = "chrome", request = "attach", program = "${file}", cwd = vim.fn.getcwd(), sourceMaps = true, protocol = "inspector", port = 9222, webRoot = "${workspaceFolder}", }, }
js-debug-adapter 1.94.0
1.Create file test.js with this simple code
let count = 0; function logMessage() { if (count < 10) { count++; console.log("count", count); setTimeout(logMessage, 1000); } } logMessage();
:qa
All related not processes should be killed.
node /path/js-debug-adapter.js process exists.
node /path/js-debug-adapter.js
This sounds like a js-debug-adapter issue. nvim-dap sends a terminate for all active sessions started with launch, when vim exits and other debug adapters also quit cleanly.
launch
Debug adapter definition and debug configuration
Debug adapter version
js-debug-adapter 1.94.0
Steps to Reproduce
1.Create file test.js with this simple code
:qa
.Expected Result
All related not processes should be killed.
Actual Result
node /path/js-debug-adapter.js
process exists.