Skip to content

Linux: ps might not be located in /bin #6

@MelleB

Description

@MelleB

I'm submitting this request here, because I think this is the most appropriate place. Feel free to point me somewhere else.

From within VSCode, if I want to attach to an existing process, I use the setting "processId": "${command:PickProcess}", in my launch.json. This fails with the error:

Process picker failed (spawn /bin/ps ENOENT)

Currently the location of ps is hardcoded to /bin

proc = spawn('/bin/ps', [ '-ax', '-o', 'pid=,ppid=,pcpu=,pmem=,command=' ]);

Although this is indeed a logical default value, this does not work on my system. A more portable version would be to use /usr/bin/env ps, which grabs the first ps binary that's on the path. Another option would be to have some sort of setting, but I'm not sure what that would look like.

I'm not sure how to development on VSCode and how I can implement/test this correctly, but I guess the fix is fairly straightforward.

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