Hello, I am trying to debug a typescript file, test.ts:
const x = 1;
const y = 2;
const z: number = 3;
console.log(x, y, z);
console.log('Test');
When I try to run the debugger on the above file, with a breakpoint on the last line, it starts and then quits immediately, without any sort of error. I have tried looking in dap-vscode-js logs, and dap logs, but can't find anything.
Interestingly, when I run the below code, almost the same as above except without type information, it works fine and stops on the breakpoint:
const x = 1;
const y = 2;
const z = 3;
console.log(x, y, z);
console.log('Test');
Here are my relevant neovim config lines:
require("dap-vscode-js").setup({
adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' }, -- which adapters to register in nvim-dap
log_file_path = "/tmp/dap_vscode_js.log",
log_file_level = vim.log.levels.DEBUG,
log_console_level = vim.log.levels.DEBUG,
})
...
use { "mxsdev/nvim-dap-vscode-js", requires = {"mfussenegger/nvim-dap"} }
use {
"microsoft/vscode-js-debug",
opt = true,
run = "npm install --legacy-peer-deps && npm run compile",
}
...
for _, language in ipairs({ "typescript", "javascript" }) do
require("dap").configurations[language] = {
{
type = "pwa-node",
request = "launch",
name = "Launch file",
program = "${file}",
cwd = "${workspaceFolder}",
},
}
end
Hello, I am trying to debug a typescript file,
test.ts
:When I try to run the debugger on the above file, with a breakpoint on the last line, it starts and then quits immediately, without any sort of error. I have tried looking in
dap-vscode-js
logs, anddap
logs, but can't find anything.Interestingly, when I run the below code, almost the same as above except without type information, it works fine and stops on the breakpoint:
Here are my relevant neovim config lines:
Can someone please help?