add firefox adapter and config; fix tables
This commit is contained in:
parent
ee05de7d29
commit
0f18e541c6
5 changed files with 30 additions and 4 deletions
12
lua/custom/dap/config/firefox.lua
Normal file
12
lua/custom/dap/config/firefox.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
local dap = require("dap")
|
||||
|
||||
local launch = {
|
||||
name = 'Debug index.html with Firefox',
|
||||
type = 'firefox',
|
||||
request = 'launch',
|
||||
reAttach = true,
|
||||
file = "${workspaceFolder}/index.html",
|
||||
}
|
||||
|
||||
table.insert(dap.configurations.javascript, launch)
|
||||
table.insert(dap.configurations.typescript, launch)
|
||||
|
|
@ -7,3 +7,4 @@ dap_vscode.load_launchjs(nil, {
|
|||
})
|
||||
|
||||
require('custom.dap.config.pwa-node')
|
||||
require('custom.dap.config.firefox')
|
||||
|
|
|
|||
|
|
@ -4,17 +4,19 @@ local dap_utils = require("dap.utils")
|
|||
local launch = {
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
name = "(pwa-node) Launch file",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
}
|
||||
local attach = {
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
name = "Attach",
|
||||
name = "(pwa-node) Attach",
|
||||
processId = dap_utils.pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
}
|
||||
|
||||
dap.configurations.javascript = { launch, attach }
|
||||
dap.configurations.typescript = { launch, attach }
|
||||
table.insert(dap.configurations.javascript, launch)
|
||||
table.insert(dap.configurations.javascript, attach)
|
||||
table.insert(dap.configurations.typescript, launch)
|
||||
table.insert(dap.configurations.typescript, attach)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue