require("dapui").toggle()
end)
-dap.adapters.node2 = {
- type = 'executable',
- command = 'node',
- args = {os.getenv('HOME') .. '/projects/tools/vscode-node-debug2/out/src/nodeDebug.js'},
-}
+require("dap-vscode-js").setup({
+ debugger_path = os.getenv('HOME') .. '/projects/tools/vscode-js-debug/out/adapter.bundle.js',
+ adapters = { 'pwa-node', 'node-terminal' },
+})
+
dap.configurations.javascript = {
{
- name = 'Launch',
- type = 'node2',
- request = 'launch',
- program = '${file}',
- cwd = vim.fn.getcwd(),
- sourceMaps = true,
- protocol = 'inspector',
- console = 'integratedTerminal',
+ type = "pwa-node",
+ request = "launch",
+ name = "Launch file",
+ program = "${file}",
+ cwd = "${workspaceFolder}",
},
{
- -- For this to work you need to make sure the node process is started with the `--inspect` flag.
- name = 'Attach to process',
- type = 'node2',
- request = 'attach',
+ type = "pwa-node",
+ request = "attach",
+ name = "Attach",
processId = require'dap.utils'.pick_process,
- },
+ cwd = "${workspaceFolder}",
+ }
}
dap.adapters.firefox = {
}
dap.configurations.typescript = {
- {
- name = 'Debug with Firefox',
- type = 'firefox',
- request = 'launch',
- reAttach = true,
- url = 'http://localhost:3000',
- webRoot = '${workspaceFolder}',
- firefoxExecutable = '/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox'
+ {
+ name = 'Debug with Firefox',
+ type = 'firefox',
+ request = 'launch',
+ reAttach = true,
+ url = 'http://localhost:3000',
+ webRoot = '${workspaceFolder}',
+ firefoxExecutable = '/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox'
}
}
require('neodev').setup({
library = { plugins = { "nvim-dap-ui" }, types = true }
})
-