Skip to content

Some lines in scope widget go under a wrong group #888

@ktakiman

Description

@ktakiman

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

  1. set a break point, start debug session
  2. open scope widget

c++
image

python
image

javascript (nodejs, express app)
image

(on Chrome Dev Tool)
image

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions