Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MelleB opened this issue Apr 23, 2019 · 0 comments
Open

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

MelleB opened this issue Apr 23, 2019 · 0 comments

Comments

@MelleB
Copy link

MelleB commented Apr 23, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant