Skip to content
clyfe edited this page Mar 11, 2011 · 6 revisions

AS Debugging tips

  • When all else fails, wrap your active_scaffold call in a rescue block and look at the backtrace:
begin
  active_scaffold :management_process do |conf|
    conf.columns = [:name, :email]
  end
rescue => e
  require 'pp'
  pp e.backtrace
end
  • Use a visual IDE like Netbeans (bit tricky to set up with Rails3) that allows you to visually inspect the stack and jump trough code/backtrace while debugging, it's a real time saver. Also, when you pretty print a backtrace in NB it's clickable
require 'pp'
pp e.backtrace # we can click the print result and jump to code

Clone this wiki locally