nvim-dap
nvim-dap copied to clipboard
Won't terminate after the first encountered breakpoint on vscode-js-debug
Debug adapter definition and debug configuration
{ "microsoft/vscode-js-debug", build = "npm install --legacy-peer-deps && npx gulp dapDebugServer && mv dist out", }
{ "mfussenegger/nvim-dap", dependencies = { "microsoft/vscode-js-debug", }, config = function() require("dap").adapters["pwa-node"] = { type = "server", host = "localhost", port = "${port}", executable = { command = "node", args = { vim.call("stdpath", "data") .. "/lazy/vscode-js-debug/out/src/dapDebugServer.js", "${port}", }, } } for _, language in ipairs({ "typescript", "javascript" }) do require("dap").configurations[language] = { { type = "pwa-node", name = "Node", request = "launch", program = "${file}", cwd = "${workspaceFolder}", console = "integratedTerminal", skipFiles = { "<node_internals>/", "${workspaceFolder}/node_modules/" }, }, } end
Debug adapter version
vscode-js-debug - latest commit 1e5bf60; nvim-dap - too
Steps to Reproduce
- Open this code:
console.log('Hello, world!');
await new Promise((resolve) => setTimeout(resolve, 5000));
console.log('Hello, world!'); // <---------------------BREAKPOINT HERE
await new Promise((resolve) => setTimeout(resolve, 5000));
console.log('Hello, world!');
- Try to terminate during first await - the process exits
- Then restart, stop on first breakpoint, continue, and terminate on the second await - nothing happens
Expected Result
Process terminates successfully during the second await too
Actual Result
Nothing happens when terminating during the second await