-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Colored stack traces #124143
Comments
The first two bullets would be a good start:
The last 3 do not have a clear implementable definition:
|
Couldn't we try some heuristics for the last three?
|
A backtrace in the default release profile looks like this:
So that heuristic is implementable, but it falls apart in a default configuration which seems bad. |
Well yes, it will fail for release builds without debug symbols. We could suggest to enable symbols for a better backtrace. If we figure out better heuristics at some point we can improve the coloring then. Having a fallback to "not color anything" is no worse that what we have right now. White is probably not the greatest for user code then, that should be reserved for unknown. |
No, it wouldn't. Those tools do their own backtrace printing that we do not maintain. |
People use white-background terminals. Using a foreground white is right out. |
Making the text bold/increased intensity ( |
Yes, that sounds fine. |
I mean, I'll still have to judge it by how it actually looks, but it sounds fine as-such. |
I don't understand what actual error means. I'm think of it to be the first BacktraceFrame but I don't know if I'm getting it wrong. Can you be more detailed? |
Is it possible that we have better stack traces?
There is so much information on them, yet they are difficult to parse. This could be improved somewhat via coloring!:
See a typical backtrace, it's hard to find where the error happened:
Some example colors
Also for the
at /home/ardi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/blocking/task.rs:42:21
It's good to have the full path so I can jump into it and see what failed, but it's a good idea to highlight the important information:
at /home/ardi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/blocking/task.rs:42:21
The text was updated successfully, but these errors were encountered: