-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
(Originally posted in a different issue; moved here at @KristofferC 's suggestion)
I've noticed that it often takes me a while to orient myself when viewing a stacktrace -- and that the time could potentially be saved were the information presented in a a slightly different way.
Here's a screenshot of an error traceback:
One main purpose of a traceback during interactive development is to focus the user's attention on what went wrong and where it did so. From that perspective, the first useful piece of information above is in the row labeled [2]
-- once you've seen that and correlated it back to the source line, you can start to understand the rest of the traceback.
In that light, I'm wondering how difficult it would be to emphasize the paths or lines indicating "user code", so they can draw your eye first and give you the context you need to interpret the rest of the stack trace?
There are a number of circumstances where the distinction between "user" and "non-user" code is less clear, such as when doing package development, or testing at the REPL code written elsewhere, but if there are simple rules that would work the majority of the time... Even just highlighting the "topmost" (non-REPL-internal) user-written code would notably improve the debugging experience and save people a lot of time.
Also, the white )
seems superfluous to me -- it catches the eye and doesn't supply any new information. Maybe just highlight the function name instead?