Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
I tried to use trepan with Rails 3. Here’s what I had to do. Use mongrel.
Using Webrick does’t work because Webrick sets up several threads and I haven’t added thread locking into the debugger. So when the debugger is stopped Webrick switches to another thread.
For unicorn, you may need to set the timeout to a large number so it doesn’t kill rails while you are sitting inside the debugger thinking.
I needed to add this to $RAILS_ROOT/Gem:
gem 'rb-treppaning' gem 'columnize'
I don’t understand why columnize but not the other gems that trepan uses like trace.
Add to environments/development.rb:
$trepan = Trepan.new(:set_restart => true)
Now when you want stop, add to the source $trepan.debugger.