This a short summary of the techniques presented in a RailsConf talk by Godfrey Chan.
In order to see the whole stack trace, uncomment the
Rails.backtrace_cleaner.remove_silencers!line in the
config/initializers/backtrace_silencers.rbfile. Then raise an expection on line you want to debug.
pp callerreturns the current execution stack
pp instance_valuesreturns a hash with all the instance variables on the object
For even more options on what to call to the Method object, include
make changes to the gem files with
bundle open [GEM_NAME]
and restore them to their original state with
gem pristine [GEM_NAME]Gem files aren’t reloaded by Rails though, so remember to restart the server between changes.
Include rails from a locally forked version
This allows you, for example, to checkout from one version to another
- git the history of the file
The whole lecture