-
Notifications
You must be signed in to change notification settings - Fork 30k
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
debugger: refactor console in lib/internal/debugger/inspect.js #45847
debugger: refactor console in lib/internal/debugger/inspect.js #45847
Conversation
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
What's the reason for this TODO btw? |
I guess it plays along with the original PRs intention of refactoring to use more primordials theme? |
But |
Ah my bad 😅😅😅 |
:-) Maybe @aduh95 knows? |
console.error('There was an internal error in Node.js. ' + | ||
'Please report this bug.'); | ||
console.error(e.message); | ||
console.error(e.stack); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There would be a difference if the inspect client listens to Runtime.consoleAPICalled
, but I don't think it does currently.
TBH I don't have any recollection of adding this TODO, so I also have to guess what my past self was thinking at the time. Using |
Landed in 17cb655 |
Refs: nodejs#38406 PR-URL: nodejs#45847 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Came across TODO by @aduh95 in https://github.com/nodejs/node/blob/0665fa4009e2aa26adb95c27a363cc7ff0686d41/lib/internal/debugger/inspect.js to remove usage of console in the file, have attempted to do that by replacing console with process.stderr.write().
Refs: #38406