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: inspector prompts #13123

Merged
merged 2 commits into from
Dec 17, 2021
Merged

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Dec 17, 2021

This commit fixes prompts printed to the terminal when
running with "--inspect" or "--inspect-brk" flags.

When debugger disconnects error is no longer printed as
users don't care about the reason debugger did disconnect.

A message suggesting to go to "chrome://inspect" is printed
if debugger is active.

Additionally and information that process is waiting for
debugger to connect is printed if running with "--inspect-brk"
flag.

Closes #13110
Closes #13124

@bartlomieju
Copy link
Member Author

bartlomieju commented Dec 17, 2021

Currently Deno does this:

deno run --inspect-brk foo.js
Debugger listening on ws://127.0.0.1:9229/ws/173192a5-2d9d-430e-a5e6-4f271675325f
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.

While Node does:

node --inspect-brk foo.js
Debugger listening on ws://127.0.0.1:9229/84790fe2-fffe-4896-a33a-e575cec30ab0
For help, see: https://nodejs.org/en/docs/inspector

Maybe we should link to https://deno.land/manual/getting_started/debugging_your_code instead?

@bartlomieju bartlomieju requested a review from ry December 17, 2021 17:14
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - i think this can be a "fix" rather than a "feature"

@bartlomieju bartlomieju changed the title feat: print prompts when running with --inspect or --inspect-brk fix: inspector prompts Dec 17, 2021
@bartlomieju bartlomieju merged commit f3cd9a9 into denoland:main Dec 17, 2021
@bartlomieju bartlomieju deleted the inspector_prompt branch December 17, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants