Fix --prof-startup never being able to profile renderer/extension host#307849
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
There was a problem hiding this comment.
Pull request overview
Fixes --prof-startup startup profiling by ensuring Electron/Node debug-related CLI switches are passed in the format they actually accept, so renderer and extension host profiling can attach successfully.
Changes:
- Pass
--remote-debugging-portas a port-only value (no host). - Pass
--inspect-brk-extensionsas a port-only value (no host), matchingparseDebugParamsbehavior.
deepak1556
left a comment
There was a problem hiding this comment.
Thanks! can you remove profileHost on inspect-brk it is also redundant https://github.com/nodejs/node/blob/4f08c6478d6ecd073c03536b8a6c473232e16c37/src/node_options.h#L90
Also for --remote-debugging-port I believe we also need remote-allow-origins since a while back.
cc @connor4312 host parameters were added in #209142
|
Yep, let me get to that on Wednesday :) |
I'm not sure this is needed. It's only checked if an Origin header is supplied, which wouldn't be the case for |
deepak1556
left a comment
There was a problem hiding this comment.
Thanks for checking, you are right it shouldn't affect non-browser clients.

--remote-debugging-portis documented as only accepting a port.Similarly,
--inspect-brk-extensionsruns throughparseDebugParams, which directly tries to convert the argument into a number.So, remove the host from both arguments.