Created
March 2, 2012 12:20
-
-
Save attilagyorffy/1958088 to your computer and use it in GitHub Desktop.
Easily enable ruby debugger under Pow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ENABLE_REMOTE_DEBUGGER_UNDER_POW=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development do | |
gem 'ruby-debug', :platforms => :ruby_18 | |
gem 'ruby-debug19', :platforms => :ruby_19, :require => 'ruby-debug' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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