Skip to content

Instantly share code, notes, and snippets.

@danpecher
Last active August 19, 2019 13:02
Show Gist options
  • Save danpecher/07503bb8ff0ed4df2417f42010d1ccea to your computer and use it in GitHub Desktop.
Save danpecher/07503bb8ff0ed4df2417f42010d1ccea to your computer and use it in GitHub Desktop.
How to enable RubyMine debugging when using pow and rails

First create a .powenv file and add:

export RUBY_DEBUG_PORT=1234
export POW_WORKERS=1

Add the following gems to your Gemfile:

gem 'ruby-debug-ide'
gem 'debase'

Create a new initializer start_debugger.rb and add the following content:

if ENV['RUBY_DEBUG_PORT']
  require 'ruby-debug-ide'
  Debugger.start_server nil, ENV['RUBY_DEBUG_PORT'].to_i
end

Now in RubyMine you should be able to add a new run configuration using the default template for Ruby remote debug setting the local and remote folders to the root of your Rails app.

Now restart pow and attempt to connect. You should see it connected in the debugger pane.

Saved from: http://stackoverflow.com/questions/24971656/debugging-in-rubymine-with-pow-as-a-server-ruby-2-1-1-rails-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment