-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
display node.js version (process.version) at the end of stacktraces #29731
Comments
@ORESoftware Is there a precedent for this anywhere? |
not sure if there is a precedent but it would be a nice feature. it does make stack traces noisier though. so maybe a flag to switch it on/off. |
If you enable --experimental-report --report-uncaught-exception you would get the node version and much more. Having said that it's still and interesting idea. |
I dunno, if you don't know what |
@Fishrock123 it's primarily for helping people online when they post stack traces, but even at work I switch between node.js versions and don't always recall or consider which one I am using etc. |
IMO printing the node.js version in stack trace is good, although it addresses a minimal subset of problem determination through FFDC (first failure data capture). For example, on a similar ground I can see that |
this is a very useful feature, useful for a thousand github issues, like this one most likely: ORESoftware/live-mutex#92 (comment) |
@ORESoftware Diagnostic report is now stable, you should consider using it for this case. |
the user case here is for stack traces in general, so you dont have to ask "what node version are you on?" sometimes its easy to forget to ask |
Indeed, I think it is a nice thing to have the Node.js version at the end of stacktraces, I opened a PR to implement that: #38332 |
My stance on this has changed. Print that stuff. Not that i have any say here, but hey. (Also, unsubscribing.) |
Maybe a topic for a different issue, but does it make sense to include a link to the API documentation for the version too? It may bloat the stack trace even more, but discoverability of API docs for different versions can be confusing and it could help remove a couple steps before opening an Issue or SO question. (ie. |
@danielleadams I'd be worried that that link might change, we currently have nodejs.org and nodejs.dev and its not impossible that we might change doc structure. Having the version should make it relatively easy to find the right version of the API docs. |
was this implemented or is it still only behind a node flag? |
Yes it is available on Node.js >= v17.0.0, no flag required (but you can disable it with a flag). @ORESoftware |
This could be added with a flag, and later turned off with a flag if you don't want to see it.
with this in mind:
nodejs/help#2204
the current stacktrace is:
it would be interesting if it looked like:
or whatever
just an idea, not sure if it's possible/desirable to implement
The text was updated successfully, but these errors were encountered: