[ANN] ruby backtracer (quality screen output) updated

R

Roger Pack

Pleased to announce a new version of ruby_backtracer.

Here's the readme.

ruby_backtracer: a library to output higher quality backtraces if an
unhandled exception is raised

ex:
running given script examples/crash.rb used to output:
examples>ruby crash.rb
crash.rb:2:in `go2': unhandled exception
from crash.rb:6:in `go'
from crash.rb:9

now outputs:
examples>ruby -r../backtrace_with_code_and_locals crash.rb

unhandled exception: crash.rb:2: raise
locals: {"a"=>"3", "b"=>55}
from:
crash.rb:1 go2(a=>3, b=>55)
locals: {"a"=>"3", "b"=>55}
crash.rb:5 go(a=>3)
locals: {"a"=>"3"}

Now wasn't that prettier?

There are several other tracing options provided, if you don't want as
much output, or want more speed. Specify which by script name.

ex: backtrace_nothing_swallowed.rb outputs the same as the default
exception output, except it doesn't have the
...skip 24 lines...
line in the middle (also no speed slowdown, and no local variables
displayed).

Try them out by running test_all.rb in the examples folder, or eyeball
the example output files in examples/example_output*

http://github.com/rogerdpack/ruby_backtracer/tree/master

Note: some options depends on ruby-debug [MRI] gem, some don't.

To install clone from github, above, then -rscriptname.

related projects: unroller,
http://eigenclass.org/hiki/method+arguments+via+introspection,
liveconsole, ruby-debug

Thanks!
-=r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top