Project

bindex

2.04
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
Bindings for your Ruby exceptions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Skiptrace Build Status

When Ruby raises an exception, it leaves a backtrace to help you figure out where the exception originated in. Skiptrace gives you the bindings as well. This can help you introspect the state of the Ruby program when the exception occurred.

Usage

Do not use this gem on production environments. The performance penalty isn't worth it anywhere outside of development.

API

Skiptrace defines the following API:

Exception#bindings

Returns all the bindings up to the one in which the exception originated in.

Exception#binding_locations

Returns an array of Skiptrace::Location objects that are like Thread::Backtrace::Location but also carry a Binding object for that frame through the #binding method.

Skiptrace.current_bindings

Returns all of the current Ruby execution state bindings. The first one is the current one, the second is the caller one, the third is the caller of the caller one and so on.

Support

CRuby

CRuby 2.5.0 and above is supported.

JRuby

To get the best support, run JRuby in interpreted mode.

export JRUBY_OPTS=--dev

Only JRuby 9k is supported.

Rubinius

Internal errors like ZeroDevisionError aren't caught.

Credits

Thanks to John Mair for his work on binding_of_caller, which is a huge inspiration. Thanks to Charlie Somerville for better_errors where the idea comes from. Thanks to Koichi Sasada for the debug inspector API in CRuby.