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

Do not open TTY (-it flags) unless needed #11

Open
sfertman opened this issue Oct 19, 2020 · 2 comments
Open

Do not open TTY (-it flags) unless needed #11

sfertman opened this issue Oct 19, 2020 · 2 comments

Comments

@sfertman
Copy link
Owner

sfertman commented Oct 19, 2020

You never know how external services may use node executable.
This is actually a problem if I'm using VSCode to debug a node application.
This one is a little bit more tricky to figure out.

  • One option is to never open tty by default and have users pass --tty option if the want to run a repl.
  • Another option is to do some basic parsing of node arguments and figure out if I need tty from that; but this could be complicated because cli is different between node versions.
  • Another option is just to setup remote debugging in VS Code
@sfertman
Copy link
Owner Author

Option 2 above looks like something doable:
Node 6:

Usage: node [options] [ -e script | script.js ] [arguments] 
       node debug script.js [arguments] 

Node 8:

Usage: node [options] [ -e script | script.js | - ] [arguments]
       node inspect script.js [arguments]

Node 10:

Usage: node [options] [ -e script | script.js | - ] [arguments]
       node inspect script.js [arguments]

Node 12:

Usage: node [options] [ script.js ] [arguments]
       node inspect [options] [ script.js | host:port ] [arguments]

Node 14:

Usage: node [options] [ script.js ] [arguments]
       node inspect [options] [ script.js | host:port ] [arguments]

@sfertman
Copy link
Owner Author

To see the NODE_OPTIONS env that VScode starts debugger with, use "console": "integratedTerminal" option

Repository owner deleted a comment from fasetto Mar 4, 2024
Repository owner deleted a comment from maiconzucco Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant