Debugging project with multiple Rails engines


I am working on a large project with multiple engines in it. Is it possible to open up the root folder that contains the application and engines and use the debugger?

When I try this, I don't get the development or production configuration options. Yet when I open up a new RubyMine instance with just the application, I do.


Comment actions Permalink

I think I've worked it out. The answer is no, you can't open up a root folder but I've been able to debug and set breakpoints by:

  • Opening up the application folder in RubyMine
  • Setting breakpoints in my engines in the External Libraries section
  • Wrapping gem 'pry' etc in my Gemfile with if !ENV['disable-pry']
  • Adding an environment variable in RubyMine disable-pry with value true
Comment actions Permalink

Found an extra option I haven't been able to test yet but I think it works...

  • Open up Settings -> Project Structure
  • Add the other folders containing your other engines

It's now possible to see all the source code and run the application in the debugger.

Please sign in to leave a comment.