Debugging project with multiple Rails engines

Hi,

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.

Thanks!

2 comments

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
0

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.
0

Please sign in to leave a comment.