-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EADDRINUSE
when trying to use this with Mason
#65
Comments
I have the same error. |
I haven't been able to solve this problem, but I found a different way to install JS debugger, not via Mason. This is less than ideal, because you have to build {
'mxsdev/nvim-dap-vscode-js',
dependencies = {
'microsoft/vscode-js-debug',
version = '1.x',
build = 'npm i && npm run compile vsDebugServerBundle && mv dist out',
},
config = function()
local dap = require 'dap'
--local utils = require 'dap.utils'
local dap_js = require 'dap-vscode-js'
--local mason = require 'mason-registry'
---@diagnostic disable-next-line: missing-fields
dap_js.setup {
-- debugger_path = mason.get_package('js-debug-adapter'):get_install_path(),
debugger_path = vim.fn.stdpath 'data' .. '/lazy/vscode-js-debug',
adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' },
}
local langs = { 'javascript', 'typescript', 'svelte', 'astro' }
for _, lang in ipairs(langs) do
dap.configurations[lang] = {
{
type = 'pwa-node',
request = 'attach',
name = 'Attach debugger to existing `node --inspect` process',
cwd = '${workspaceFolder}',
skipFiles = {
'${workspaceFolder}/node_modules/**/*.js',
'${workspaceFolder}/packages/**/node_modules/**/*.js',
'${workspaceFolder}/packages/**/**/node_modules/**/*.js',
'<node_internals>/**',
'node_modules/**',
},
sourceMaps = true,
resolveSourceMapLocations = {
'${workspaceFolder}/**',
'!**/node_modules/**',
},
},
}
end
end,
}, |
Good god! I've spent hours fiddling with this. I almost gave up until I stumbled onto this... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried to use this extension with Mason, so I passed it the path from the registry
However, when trying to attach to a process I get the following error:
The text was updated successfully, but these errors were encountered: