node icon indicating copy to clipboard operation
node copied to clipboard

Allow inspector flags with SEA binaries via configuration

Open cmaster11 opened this issue 1 year ago • 2 comments

What is the problem this feature will solve?

It is currently impossible to enable the debugger at the start in a SEA binary because both CLI flags (like --inspect) and NODE_OPTIONS don't allow it. The only current workaround is sending the SIGUSR1 signal to the program, which can only be achieved when the program starts successfully and has limitations due to the impossibility of specifying the HOST:PORT args.

See: https://github.com/nodejs/node/blob/8a41d9b636be86350cd32847c3f89d327c4f6ff7/src/node_options.cc#L306

What is the feature you are proposing to solve the problem?

I think it would be nice to have an additional flag in the SEA config that would allow for these options to be enabled. This would allow the distribution of debuggable binaries for any testers involved in a project.

What alternatives have you considered?

The current alternative is to distribute the standalone node binary + a CJS bundle, which is not the same as having a single file UX-wise.

cmaster11 avatar Feb 07 '24 05:02 cmaster11

Allowing this in the configuration makes sense to me. Not sure what the reasoning to ignore it initially was - that was before we had the configuration though. Any thoughts? @nodejs/single-executable

joyeecheung avatar Feb 07 '24 16:02 joyeecheung

I do not remember precisely, but I remember having a discussion with @RaisinTen this past year.

But it makes sense to me to allow this configuration, too.

tony-go avatar Feb 12 '24 11:02 tony-go

There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the https://github.com/nodejs/node/labels/never-stale label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document.

github-actions[bot] avatar Aug 11 '24 01:08 github-actions[bot]