2022-09-18 15:43:22 +02:00
|
|
|
vim.fn.sign_define('DapBreakpoint', {text='🟥', texthl='', linehl='', numhl=''})
|
|
|
|
vim.fn.sign_define('DapStopped', {text='⭐️', texthl='', linehl='', numhl=''})
|
2022-08-23 16:02:27 +02:00
|
|
|
local dap = require('dap')
|
|
|
|
dap.adapters.node2 = {
|
|
|
|
type = 'executable',
|
|
|
|
command = 'node',
|
|
|
|
args = {os.getenv('HOME') .. '/dev/microsoft/vscode-node-debug2/out/src/nodeDebug.js'},
|
|
|
|
}
|
2022-09-18 15:43:22 +02:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
}
|