-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
bootstrap: expose process._rawDebug as a global function #55907
base: main
Are you sure you want to change the base?
Conversation
The `process._rawDebug` function is very helpful when triaging bugs that cross asynchronous boundaries. It is also quite cumbersome to write out `process._rawDebug` everywhere such a line is needed. So this change exposes it as a global function to facilitate an improved developer experience.
Review requested:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55907 +/- ##
==========================================
- Coverage 88.41% 87.98% -0.44%
==========================================
Files 654 653 -1
Lines 188036 187868 -168
Branches 36187 35890 -297
==========================================
- Hits 166260 165293 -967
- Misses 14989 15738 +749
- Partials 6787 6837 +50
|
Hmmm... I'm not a big fan of adding new Node.js specific globals, and given that |
In my experience, when someone wants to use this function they are likely going to be writing it in multiple places. I hope we can agree that it is easier, and less annoying, to type out Regarding adding Node.js specific globals: isn't that the point of having a specific runtime? To be able to design it such that it provides an environment that is specific to the use cases of the developers that are using it? As an example, at least in Vivaldi and Safari, all Window properties and methods are available without needing to prefix them with |
The
process._rawDebug
function is very helpful when triaging bugs that cross asynchronous boundaries. It is also quite cumbersome to write outprocess._rawDebug
everywhere such a line is needed. So this change exposes it as a global function to facilitate an improveddeveloper experience.
If we think that a naming collision is possible, maybe it could be named
nodeDebug
or similar.