Open anatskiy opened 1 year ago
I'm working on it at the moment as I am implementing an extension to run the user's npm scripts directly from the DAP's options selector.
For the moment, the only way to do it from within Neovim that I found is to go into DAP-UI's integrated terminal (console), enter insert mode and press <C-c>
.
I'm looking into a way to catch the terminal ID and kill it but in the meantime, that's the only solution I've found that's not too cumbersome. Here's my config, for reference. It's the same as the readme, the interesting part is:
{
name = "Run npm script",
type = "pwa-node",
request = "launch",
cwd = "${workspaceFolder}",
rootPath = "${workspaceFolder}",
sourceMaps = true,
skilpFiles = { "<node_internals>/**" },
protocol = "inspector",
console = "integratedTerminal",
runtimeExecutable = "npm",
runtimeArgs = {
"run-script",
"YOUR_NPM_SCRIPT" -- e.g.: "start"
}
}
The interesting line is console = "integratedTerminal"
It works for "launch" and probably "attach" as well
I'll repost when (if?) I find a way to do that automatically.
Cheers
When I try to run a debug session of a basic node server, I can debug it just fine. But when I terminate the session (
require('dap').terminate()
) or disconnect from it (require('dap').disconnect({ terminateDebuggee = true })
) and then rerun a new session, I get an error about the node server port being already in use, meaning, that the previous node process wasn't properly closed. I'm clueless about what to do ☹️I've got the following config:
The installed version of
vscode-js-debug
is 1.78.0