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

Make RunInTerminalResponse return processId as documented #61640

Closed
gjsjohnmurray opened this issue Oct 23, 2018 · 3 comments
Closed

Make RunInTerminalResponse return processId as documented #61640

gjsjohnmurray opened this issue Oct 23, 2018 · 3 comments
Assignees
Labels
api debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@gjsjohnmurray
Copy link
Contributor

Per #16786 (Dec 2016) it seems that the initial implementation (#10574) of RunInTerminalRequest wasn't able to provide the processId field in its RunInTerminalResponse.

Any chance that subsequent developments might make this feasible now? For example, #14286 looked like it could be relevant.

@jrieken jrieken assigned Tyriar and unassigned jrieken Oct 24, 2018
@Tyriar Tyriar assigned weinand and unassigned Tyriar Oct 24, 2018
@Tyriar Tyriar added api debug Debug viewlet, configurations, breakpoints, adapter issues labels Oct 24, 2018
@weinand
Copy link
Contributor

weinand commented Oct 24, 2018

It is not possible to return the process id of the command that runs in the shell.

With the fix for #14286 it is possible to get the process id of the shell, but not of the command that runs inside the shell.

I see no way how to fix this.

Please note: depending on the command being run in shell, it still might be possible to find the process id of the command. E.g. for node.js the debug adapter launches node.js with the "RunInTerminal" request and if that was successful it has a debug connection to node.js. This makes it possible to get the process id by evaluating a process.pid expression.
However, VS Code's implementation of the "RunInTerminal" request cannot use that approach because it does not know anything about the command being run.

@weinand weinand closed this as completed Oct 24, 2018
@gjsjohnmurray
Copy link
Contributor Author

So maybe give us the process id of the shell? Then since we're in control of what command it's running, perhaps in some cases it'll be possible to determine the command's process id (e.g. looking for child processes?). Just a thought...

@weinand
Copy link
Contributor

weinand commented Oct 24, 2018

@gjsjohnmurray I agree that returning the shell's id is better than nothing.
But I cannot return this id under the processId attribute because existing debug adapters would expect the command's id here.
I suggest that you create a feature request for adding a "shellProcessId" at https://github.com/Microsoft/debug-adapter-protocol/issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

4 participants