-
-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Description
Debug adapter definition and debug configuration
I can see smilar issues happening in at least three debug adapters I tried with three different languages.
So it appears that this is not debug-adapter specific issue.
Installed the adapters via Mason
-- cpp
dap.adapters.cppdbg = {
type = 'executable',
command = 'OpenDebugAD7',
id = 'cppdbg',
}
dap.configurations.cpp = {
{
name = 'Launch file',
type = 'cppdbg',
request = 'launch',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopAtEntry = true,
},
}
-- javascript
dap.adapters.node2 = {
type = 'executable',
command = 'node-debug2-adapter',
args = {},
}
dap.configurations.javascript = {
{
name = 'Launch',
type = 'node2',
request = 'attach',
program = '${file}',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
console = 'integratedTerminal',
},
}
-- python
dap.adapters.python = {
type = 'executable',
command = 'debugpy-adapter',
args = {},
}
dap.configurations.python = {
{
type = 'python', -- the type here established the link to the adapter definition: `dap.adapters.python`
request = 'launch',
name = 'Launch file',
program = '${file}', -- This configuration will launch the current file if used.
},
}Debug adapter version
cpptools: 1.14.3, debugpy: 1.6.6, vscode-node-debug2: 1.43.0
Steps to Reproduce
- set a break point, start debug session
- open scope widget
javascript (nodejs, express app)

Expected Result
In the example above:
c++
argc goes under Locals
python
y goes under Locals
javascript
res: ServerResponse { ... goes under Local
port: 2000 goes under Closure
Actual Result
In the example above:
c++
argc goes under under Globals
python
y goes under Globals
javascript
res: ServerResponse { ... is under Closure
port: 2000 goes under Globals
Metadata
Metadata
Assignees
Labels
No labels


