Skip to content

Pick process shows no results #993

@MariaSolOs

Description

@MariaSolOs

Debug adapter definition and debug configuration

I have the following configuration for debugging JavaScript/TypeScript code:

return {
    {
        'mfussenegger/nvim-dap',
        dependencies = {
            -- JS/TS debugging.
            {
                'mxsdev/nvim-dap-vscode-js',
                opts = {
                    debugger_path = vim.fn.stdpath 'data' .. '/lazy/vscode-js-debug',
                    adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' },
                },
            },
            {
                'microsoft/vscode-js-debug',
                version = '1.x',
                build = 'npm i && npm run compile vsDebugServerBundle && mv dist out',
            },
        },
        config = function()
            local dap = require 'dap'

            for _, language in ipairs { 'typescript', 'javascript' } do
                dap.configurations[language] = {
                    {
                        type = 'pwa-node',
                        request = 'attach',
                        processId = require('dap.utils').pick_process,
                        name = 'Attach debugger to existing node process',
                        sourceMaps = true,
                        cwd = '${workspaceFolder}',
                        resolveSourceMapLocations = {
                            '${workspaceFolder}/**',
                            '!**/node_modules/**',
                        },
                        outFiles = {
                            '${workspaceFolder}/**',
                            '!**/node_modules/**',
                        },
                        skipFiles = { '**/node_modules/**' },
                    },
                }
            end
        end,
    },
}

After 0a02ed1, nothing shows up in the pick process window. I cannot reproduce this with d17d1bb.

Debug adapter version

vscode-js-debug 1.81.0

Steps to Reproduce

  1. In a JavaScript file, set up a breakpoint.
  2. Start a node process to run that file, using node --inspect-brk.
  3. Run require('dap').continue() to open the pick_process window. Notice how there are no processes to pick from.

Expected Result

For the pick_process window to list something:
image

Actual Result

The window shown above lists nothing when updating nvim-dap to 0a02ed1.

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