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

Allow pid or host:port entry in the process picker #2078

Open
tmm1 opened this issue Sep 6, 2024 · 5 comments
Open

Allow pid or host:port entry in the process picker #2078

tmm1 opened this issue Sep 6, 2024 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@tmm1
Copy link

tmm1 commented Sep 6, 2024

Is your feature request related to a problem? Please describe.

The regexp for showing available processes can be quite frustrating, esp when I already know the target pid/port I'm trying to debug.

Describe the feature you'd like

Under Debug: Attach to Node Process when a dialog appears with a text box placeholder Pick the node.js process to attach to, I would love to be able to paste something like 1234 or 127.0.0.1:56777

@tmm1 tmm1 added the feature-request Request for new features or functionality label Sep 6, 2024
@connor4312
Copy link
Member

connor4312 commented Sep 6, 2024

This works for me, e.g. here's filtering for a PID 21172 and also a node process listening for the inspector on 21172. Could you share more about the scenario you expect to work?

image

@tmm1
Copy link
Author

tmm1 commented Sep 6, 2024

I want to attach to vscode insiders exthost: Code - Insiders Helper (Plugin)

Since the process name does not say node, and it won't appear.

This kind of situation is more common now with features like https://nodejs.org/api/single-executable-applications.html

If you follow the guide on the URL above, you end up with a binary named ./hello which doesn't appear in the picker

@tmm1
Copy link
Author

tmm1 commented Sep 6, 2024

It looks like the picker won't accept inputs easily.. the input is just used as a filter over the picker choices?

async function listProcesses(): Promise<IProcessItem | undefined> {
const nodeProcessPattern = /^(?:node|iojs)(?:$|\b)/i;
let seq = 0; // default sort key
const quickPick = vscode.window.createQuickPick<IProcessItem>();

Maybe it's simpler to tackle this with a user-override on the regex instead, ala #1480 (comment)

@connor4312
Copy link
Member

Or maybe just an option to "Show all processes..." in the picker

@tmm1
Copy link
Author

tmm1 commented Sep 6, 2024

You're right, an escape hatch to be able to filter over all the processes with a pid/port or name like (Plugin) would work splendidly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants
@tmm1 @connor4312 and others