added js dap config

This commit is contained in:
Radu Macocian
2025-10-13 10:26:26 +02:00
parent 5d92255275
commit a8d391bd86
2 changed files with 27 additions and 1 deletions

View File

@@ -16,6 +16,18 @@ dap.listeners.after.event_exited["dapui_config"] = function()
end
require("dap-python").setup("~/Projects/odoo/venv/bin/python3")
dap.adapters['pwa-chrome'] = {
type = 'server',
host = 'localhost',
port = '${port}',
executable = {
command = 'node',
args = {
vim.fn.stdpath('data') .. '/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js',
'${port}',
},
}
}
vim.keymap.set("n", "<leader>5", function() dap.continue() end)
vim.keymap.set("n", "<leader>6", function() dap.step_over() end)
@@ -42,3 +54,17 @@ dap.configurations.python = {
}
}
}
dap.configurations.javascript = {
{
type = "pwa-chrome",
request = "attach",
name = "Launch Odoo JS Tour",
program = "${file}",
cwd = vim.fn.getcwd(),
port = 9222,
webRoot = '${workspaceFolder}',
sourceMaps = true,
protocol = 'inspector',
}
}