ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:56096] [CommonRuby - Feature #8661][Open] Add option to print backstrace in reverse order(stack frames first & error last)
@ 2013-07-20 20:20 gary4gar (Gaurish Sharma)
  2013-07-22 19:56 ` [ruby-core:56109] " Joshua Ballanco
                   ` (15 more replies)
  0 siblings, 16 replies; 18+ messages in thread
From: gary4gar (Gaurish Sharma) @ 2013-07-20 20:20 UTC (permalink / raw)
  To: ruby-core


Issue #8661 has been reported by gary4gar (Gaurish Sharma).

----------------------------------------
Feature #8661: Add option to print backstrace in reverse order(stack frames first & error last)
https://bugs.ruby-lang.org/issues/8661

Author: gary4gar (Gaurish Sharma)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


Currently the way ruby prints the backtrace is that the error comes first & then the stack frames. like this

  Main Error Message
stack frame 1
stack frame 2
stack frame 3
.....

 this is perfectly fine provided

1. Backstraces are short, so fits in terminal.hence, no need to scroll.
2. you read it from top to bottom.


But, I am a rails developer where 

1. Backstraces are always HUGE, therefore seldom don't fit in terminal. Means LOTS of scrolling to do everytime we get an error.
2. in terminal we tend to read backstraces from bottom to top, especially when tailing(tail -f) the production logs. 
3. people, who practice Test-driven development literally spend most of their time scrolling to read backstraces to the point most end up buying a larger display.

Proposed Solution:
 Please add a way so we can configure backstraces to be printed in reverse order. so if you are reading from bottom, say from terminal, you can get the main error message without need to scroll. like this



stack frame 3
stack frame 2
stack frame 1
 Main Error Message
..... 

this would save lot of time because when the error message is print at the bottom, no need to scroll for reading it. Not sure if this can be done today. I tried Overriding Exception#backtrace but it caused stack level too deep & illegal hardware instruction Error.

Attached are currently what backstrace currently looks like & how there be an option to make it look for comparison.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-11-07  4:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-20 20:20 [ruby-core:56096] [CommonRuby - Feature #8661][Open] Add option to print backstrace in reverse order(stack frames first & error last) gary4gar (Gaurish Sharma)
2013-07-22 19:56 ` [ruby-core:56109] " Joshua Ballanco
2013-07-23  2:09   ` [ruby-core:56117] " Nobuyoshi Nakada
2016-12-22 22:50 ` [ruby-core:78808] [CommonRuby Feature#8661] " x
2017-02-22  8:49 ` [ruby-core:79669] " nobu
2017-05-10 10:00 ` [ruby-core:81087] " eregontp
2017-05-10 10:01 ` [ruby-core:81088] " eregontp
2017-05-11  6:11 ` [ruby-core:81100] [CommonRuby Feature#8661][Assigned] " ko1
2017-05-19  6:09 ` [ruby-core:81246] [CommonRuby Feature#8661] " naruse
2017-05-20  2:14 ` [ruby-core:81299] " shyouhei
2017-10-03 13:06 ` [ruby-core:83088] " sonots
2017-11-29  7:46 ` [ruby-core:83953] " mame
2017-12-11 15:47 ` [ruby-core:84161] " kou
2017-12-24 15:09 ` [ruby-core:84428] " aeroastro007
2018-06-27  3:24 ` [ruby-core:87647] " samuel
2018-08-17 14:41 ` [ruby-core:88515] " mame
2018-08-18 17:45 ` [ruby-core:88545] " shevegen
2019-11-07  4:45 ` [ruby-core:95739] " mame

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).