forked from activescaffold/active_scaffold
-
Notifications
You must be signed in to change notification settings - Fork 34
AS Debugging tips
clyfe edited this page Mar 11, 2011
·
6 revisions
- When all else fails, wrap your
active_scaffoldcall 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