Skip to content

processId as string fails to attach on Windows since v2.1.2 #335

@benjaminGoldenRace

Description

@benjaminGoldenRace

Since version 2.1.2, the attach request on Windows no longer works correctly when using ${command:pickProcess}. It appears there is a type mismatch: the debugger seems to expect an integer for the processId, but VSCode's ${command:pickProcess} returns the ID as a string.

Environment:

OS: Windows
Plugin Version: 2.1.2 (and newer)
VSCode Version: 1.108.0

Steps to Reproduce:

Use the following configuration in launch.json:

{
  "name": "Lua: Attach",
  "type": "lua",
  "request": "attach",
  "processId": "${command:pickProcess}"
}

Actual Behavior:

The debugger fails to attach silently. The plugin fails to attach when processId is a string (which is the default output of ${command:pickProcess}).

Expected Behavior:

The plugin should handle the processId as a string or automatically convert it to an integer to maintain compatibility with the built-in VSCode process picker.

Workaround found:

If I manually hardcode the processId as an integer (e.g., "processId": 1234), the plugin attaches and works perfectly. However, this is not a viable solution for dynamic debugging.

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