Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162local dap = require("dap")
-- https://github.com/microsoft/vscode-node-debug2dap.adapters.node2 = { type = "executable", command = "node", args = { vim.fn.stdpath("data") .. "/mason/packages/node-debug2-adapter/out/src/nodeDebug.js" },}
-- https://github.com/Microsoft/vscode-chrome-debugdap.adapters.chrome = { type = "executable", command = "node", args = { vim.fn.stdpath("data") .. "/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" },}
dap.configurations.javascript = { { name = "Launch", type = "node2", request = "launch", program = "${file}", cwd = vim.fn.getcwd(), sourceMaps = true, protocol = "inspector", console = "integratedTerminal", }, { -- 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", processId = require("dap.utils").pick_process, },}
dap.configurations.javascriptreact = { -- change this to javascript if needed { type = "chrome", request = "attach", program = "${file}", cwd = vim.fn.getcwd(), sourceMaps = true, protocol = "inspector", port = 9222, webRoot = "${workspaceFolder}", },}
dap.configurations.typescriptreact = { -- change to typescript if needed { type = "chrome", request = "attach", program = "${file}", cwd = vim.fn.getcwd(), sourceMaps = true, protocol = "inspector", port = 9222, webRoot = "${workspaceFolder}", },}