Skip to content

Instantly share code, notes, and snippets.

@attilagyorffy
Created March 2, 2012 12:20
Show Gist options
  • Save attilagyorffy/1958088 to your computer and use it in GitHub Desktop.
Save attilagyorffy/1958088 to your computer and use it in GitHub Desktop.
Easily enable ruby debugger under Pow
export ENABLE_REMOTE_DEBUGGER_UNDER_POW=true
# config/environments/development.rb
if ENV['ENABLE_REMOTE_DEBUGGER_UNDER_POW'] && Debugger
Debugger.settings[:autoeval] = true
Debugger.settings[:autolist] = 1
Debugger.settings[:reload_source_on_change] = true
Debugger.start_remote
end
group :development do
gem 'ruby-debug', :platforms => :ruby_18
gem 'ruby-debug19', :platforms => :ruby_19, :require => 'ruby-debug'
end
1) Add a `debugger` statement into your app.
2) Don't forget to restart your application:
$ touch tmp/restart.txt
3) Connect ot the debugger process remotely by doing `bundle exec rdebug -c`
4) Profit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment