Dream remote debugging with the PassengerDebugger option

From the Passenger documentation: http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerdebugger_lt_on_off_gt

5.16.3. PassengerDebugger <on|off>

Available in Phusion Passenger Enterprise since version 3.0.0.

Turns support for application debugging on or off. In case of Ruby applications, turning this option on will cause them to load the ruby-debug gem (when on Ruby 1.8) or the debugger gem (when on Ruby 1.9). If you’re using Bundler, you should add this to your Gemfile:

gem 'ruby-debug', :platforms => :ruby_18
gem 'debugger', :platforms => :ruby_19

Once debugging is turned on, you can use the command passenger-irb --debug <PID> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a debugger command.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. The default value is off.

Don't you think this is the seed for adding a feature to RubyMine for enabling remote debugging like Zend Studio allows for PHP through their Zend Debugger?
In a video about this feature (http://vimeo.com/45923773#) they use passenger-status to get the PID to pass to the passenger-irb --debugger.

So, in my dream setup, I'd have the PassengerDebugger option always set on my localhost for development.
Then I'd start a remote debug session in RubyMine, that will show me a list of running instances to chose from (if there are more than 1).
And then I'd reload the page in the browser to make the code reach my first breakpoint.

And in my dreamy dream setup, I'd have installed the RubyMine debugger extension for Chrome.
Then I'd simply navigate to the page I want to debug and click the rdebug button on my browser.
And that will make RubyMine stop at the first executable line, waiting for me to get in and debug.
(incidentally, this is exactly what Zend Studio offers, admittedly at a 300 euros price tag)

I think RubyMine is the high end IDE for RoR out there.
Why don't you make it the luxury one?



> this is exactly what Zend Studio offers, admittedly at a 300 euros price tag

This is exactly what Xdebug offers to PHP dvelopment for free. :)



Not really. Development experience with Xdebug plus Eclipse PDT is not the same you get with Zend Debugger + Studio.

The former setup certainly works, the latter flies. Additionally, The Zend Toolbar for Firefox is just excellent.
And it's really very simple what it does, just setup some cookies and reload. At Zend they did a great integration job.

When you program in Eclipse/Xdebug you need to debug sometime. In Zend Studio/Debugger you just program.
Quite a difference.


Actually, for PHP, Komodo w/ Xdebug and Firefox w/ Firebug is a winning combination.

Back on your initail point, yes it would be great to have similar client/server debugging capabilites with Ruby. It would be nice to call a URL from the browser, and reach the controller breakpoint. In addition, a Firebug type browser extenstion to turn on/off debugging, would make it even better.



Please sign in to leave a comment.