bootstrap: expose process._rawDebug as a global function - #55907
bootstrap: expose process._rawDebug as a global function#55907jsumners wants to merge 6 commits into
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 Report✅ All 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
🚀 New features to boost your workflow:
|
|
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 |
|
|
I disagree. Node.js is a runtime for writing system applications. As such, |
|
This pull request has been marked as stale due to 90 days of inactivity. |
|
Not stale. Just being ignored. |
The
process._rawDebugfunction is very helpful when triaging bugs that cross asynchronous boundaries. It is also quite cumbersome to write outprocess._rawDebugeverywhere 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
nodeDebugor similar.