[dap] Some progress

Looks like we can load the launch.json. But it seems the debugger
is being started twice, as I get an EADDRINUSE error on
:DapContinue
This commit is contained in:
Adam Cooper 2023-12-29 16:40:11 -05:00
parent c3109dcf17
commit 938ff36c6b

View file

@ -451,14 +451,18 @@ vim.keymap.set('n', '<leader>st', '<cmd>Lspsaga term_toggle<CR>')
-- setup adapters
require('dap-vscode-js').setup({
node_path = 'node',
debugger_path = vim.fn.stdpath('data') .. '/mason/packages/js-debug-adapter',
debugger_cmd = { 'js-debug-adapter' },
adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' },
log_file_path = vim.fn.stdpath('cache') .. '/dap_vscode_js.log',
log_file_level = 1,
log_console_level = vim.log.levels.ERROR,
})
local dap = require('dap')
--[[
local dap = require('dap')
for _, language in ipairs({ "typescript", "javascript" }) do
dap.configurations[language] = {
{
@ -493,7 +497,9 @@ for _, language in ipairs({ "typescript", "javascript" }) do
end
--]]
require('dap.ext.vscode').load_launchjs(nil, {})
local types_to_filetypes_table = {}
types_to_filetypes_table['pwa-node'] = { 'javascript', 'typescript' }
require('dap.ext.vscode').load_launchjs(nil, types_to_filetypes_table)
-- Tweak GitSigns blame color
-- This differentiates the cursorline from the git blame text