debugger: refactor console in lib/internal/debugger/inspect.js#45847
debugger: refactor console in lib/internal/debugger/inspect.js#45847nodejs-github-bot merged 3 commits intonodejs:mainfrom
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.
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