summaryrefslogtreecommitdiffstatshomepage
path: root/nvim/lua/theprimeagen/debugger.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/theprimeagen/debugger.lua')
-rw-r--r--nvim/lua/theprimeagen/debugger.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/nvim/lua/theprimeagen/debugger.lua b/nvim/lua/theprimeagen/debugger.lua
new file mode 100644
index 0000000..c935273
--- /dev/null
+++ b/nvim/lua/theprimeagen/debugger.lua
@@ -0,0 +1,19 @@
+local dap_install = require("dap-install")
+dap_install.config("chrome", {})
+
+
+local dap = require("dap");
+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}"
+ }
+}
+
+require('dap.ext.vscode').load_launchjs()