Feature #8661
Updated by sawa (Tsuyoshi Sawada) over 4 years ago
Currently, Currently the way ruby prints the backtrace is that the error comes first and & then the stack frames, frames. like this: this ``` Main Error Message stack frame 1 stack frame 2 stack frame 3 ..... ``` This this is perfectly fine provided: provided 1. Backtraces Backstraces are short, and so fits in terminal, hence, there is terminal.hence, no need to scroll. 2. You you read it from top to bottom. But, I am a rails developer where 1. Backtraces Backstraces are always HUGE, therefore seldom don't fit in terminal, which means that a LOT terminal. Means LOTS of scrolling is needed every time I to do everytime we get an error. 2. In terminal, I in terminal we tend to read backtraces backstraces from bottom to top, especially when tailing (tail tailing(tail -f) the production logs. 3. I people, who practice test-driven development, and Test-driven development literally spend most of my their time scrolling to read backtraces, and ended backstraces to the point most end up buying a larger display. Proposed Solution: Please add a way to so we can configure backtraces backstraces to be printed in reverse order order. so that if I am you are reading from the bottom, say from the terminal, I you can get to the main error message without scrolling, need to scroll. like this: this ``` stack frame 3 stack frame 2 stack frame 1 Main Error Message ..... ``` This this would save a lot of time because when the error message is printed print at the bottom, there would be no need to scroll to read for reading it. I am not Not sure if this can be done today. I tried overriding `Exception#backtrace`, Overriding Exception#backtrace but it caused a stack level too deep and & illegal hardware instruction error. Error. Attached is a comparison of how a backtrace are currently what backstrace currently looks like and & how I want the there be an option to make it look. look for comparison.