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

fix: preserve process.execArgv #161853

Merged
merged 9 commits into from Oct 24, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Sep 26, 2022

This ensures flags like --prof are passed down to the vs code process so we can profile everything.

To test this:

  1. run ./lib/node --prof .
  2. in another terminal, run ps -ejww

You should see --prof next to every vs code process.

P.S. this approach leans on a pattern already in the codebase:

// if not set, the forked process inherits the execArgv of the parent process
// --inspect and --inspect-brk can not be inherited as the port would conflict
forkOpts.execArgv = process.execArgv.filter(a => !/^--inspect(-brk)?=/.test(a)); // remove

This ensures flags like `--prof` are passed down to the vs code process so
we can profile everything.

To test this:
1. run `./lib/node --prof .`
2. in another terminal, run `ps -ejww`

You should see `--prof` next to every vs code process.
@jsjoeio jsjoeio marked this pull request as ready for review September 26, 2022 21:50
@bpasero bpasero assigned alexdima and unassigned bpasero Sep 27, 2022
@jsjoeio
Copy link
Contributor Author

jsjoeio commented Oct 7, 2022

@alexdima any update on this? happy to open an issue if you'd like more context first.

Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@alexdima alexdima added this to the October 2022 milestone Oct 24, 2022
@alexdima alexdima merged commit 30c0860 into microsoft:main Oct 24, 2022
formigoni pushed a commit to formigoni/vscode that referenced this pull request Oct 27, 2022
This ensures flags like `--prof` are passed down to the vs code process so
we can profile everything.

To test this:
1. run `./lib/node --prof .`
2. in another terminal, run `ps -ejww`

You should see `--prof` next to every vs code process.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants