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

Cannot debug tests with --debug flag #159011

Closed
jrieken opened this issue Aug 24, 2022 · 3 comments · Fixed by #159040
Closed

Cannot debug tests with --debug flag #159011

jrieken opened this issue Aug 24, 2022 · 3 comments · Fixed by #159040
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Aug 24, 2022

  • use the script to run unit test
  • try to use its --debug flag
  • 😢 doesn't work anymore, it seems to collide and be consumed by Electron
jrieken@jrieken-m1-pro vscode % ./scripts/test.sh --debug
yarn run v1.22.17
$ node build/lib/electron
✨  Done in 0.27s.
[26333:0824/084242.537994:ERROR:node_bindings.cc(242)] Error parsing Node.js cli flags
electron: [DEP0062]: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` and `node --inspect-brk` instead.
jrieken@jrieken-m1-pro vscode %
@jrieken
Copy link
Member Author

jrieken commented Aug 24, 2022

@deepak1556 Is this something that can be configured inside electron or do we need to pick another flag?

@deepak1556
Copy link
Contributor

When launching the main process, Electron gives Node.js a chance to parse the runtime arguments before the application script gets executed, the above error is actually thrown from Node.js https://github.com/nodejs/node/blob/main/src/node_options.cc#L45-L49 and we cannot configure it. Also, CLI parsing errors from Node.js will abort the process as default behavior. I recommend changing the flag name to make it future proof.

@jrieken
Copy link
Member Author

jrieken commented Aug 24, 2022

Makes sense. Thanks for clarifying

@jrieken jrieken added this to the August 2022 milestone Aug 24, 2022
jrieken added a commit that referenced this issue Aug 24, 2022
jrieken added a commit that referenced this issue Aug 24, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2022
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants