From 6aad358b5f325c584f009479f08f0205c43b7e7b Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Fri, 30 Aug 2024 15:03:23 -0300 Subject: Feat: suport for dap ts --- lua/pi/dap/configs/javascript.lua | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'lua/pi/dap') diff --git a/lua/pi/dap/configs/javascript.lua b/lua/pi/dap/configs/javascript.lua index 03173ba..ef616f1 100644 --- a/lua/pi/dap/configs/javascript.lua +++ b/lua/pi/dap/configs/javascript.lua @@ -4,17 +4,23 @@ dap.adapters.firefox = { command = 'firefox-debug-adapter', } -dap.configurations.typescript = { - { - name = 'Debug with Firefox', - type = 'firefox', - request = 'launch', - reAttach = true, - url = 'http://localhost:3010', - webRoot = '${workspaceFolder}', - firefoxExecutable = '/home/elvis/.local/bin/firefox' - }, -} +for _, language in ipairs({ "typescript", "javascript", "javascriptreact", "typescriptreact" }) do + dap.configurations[language] = { + { + name = 'Debug with Firefox', + type = 'firefox', + request = 'launch', + reAttach = true, + url = 'http://localhost:5173', + webRoot = '${workspaceFolder}', + firefoxExecutable = '/home/elvis/.local/bin/firefox', + -- firefoxArgs = {'-start-debugger-server', '--new-instance'}, + enableCRAWorkaround = true, + liftAccessorsFromPrototypes = 3, + }, + } +end + -- require("dap-vscode-js").setup { -- debugger_cmd = { "js-debug-adapter" }, -- adapters = { "pwa-node", "pwa-chrome", "node-terminal" }, -- cgit v1.2.3