Does anybody use the interactive debugger with Rails? When I used to use mod_perl, I could break into the debugger using Apache::DB from any point in my code (and a debugging enabled apache process), I wonder if there is a similar tool for mod_ruby, or a way to do remote debugging with plain cgi. Or, has anybody gone through the trouble to set up a test environment to run dispatch.cgi from the command line or gud? I figure I will try and do that if nothing else. I don''t want to reinvent the wheel. -Jeff _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Tuesday, December 7, 2004, 7:49:40 AM, Jeffrey wrote:> Does anybody use the interactive debugger with Rails?Are you talking about the "breakpoint" command? No, but I''ve used it heaps with regular command-line Ruby programs. I can see that you''d have difficulty using it with mod_ruby. All it does is break out into an IRB session. I don''t know anything about Perl and Apache::DB.> When I used to use mod_perl, I could break into the > debugger using Apache::DB from any point in my code (and a debugging enabled > apache process), I wonder if there is a similar tool for mod_ruby, or a way > to do remote debugging with plain cgi.If you run your app under Webrick (dispatch.servlet), you''ll have no problem using the debugger. Florian Gross, who created "breakpoint", is working on genuine remote debugging using DRb (distributed Ruby). That will make its way into Rails via dev-utils in due course. That will presumably work with mod_ruby and FastCGI.> Or, has anybody gone through the trouble to set up a test > environment to run dispatch.cgi from the command line or gud? I > figure I will try and do that if nothing else. I don''t want to > reinvent the wheel.I don''t know about this. Cheers, Gavin
I''m an ultra-noob when it comes to Rails and Ruby, but I found this a while back that''s been hella-useful for debugging my models : http://www.rubyonrails.org/show/Environments It shows you how to use the production environment to load up your models in irb. It''s not the same as remote debugging via perl -d and apache, but it''s been useful for me. -- Mando On Tue, 7 Dec 2004 12:24:19 +1100, Gavin Sinclair <gsinclair-81uBx+iSpXA0n/F98K4Iww@public.gmane.org> wrote:> On Tuesday, December 7, 2004, 7:49:40 AM, Jeffrey wrote: > > > Does anybody use the interactive debugger with Rails? > > Are you talking about the "breakpoint" command? > > No, but I''ve used it heaps with regular command-line Ruby programs. I > can see that you''d have difficulty using it with mod_ruby. All it > does is break out into an IRB session. I don''t know anything about > Perl and Apache::DB. > > > When I used to use mod_perl, I could break into the > > debugger using Apache::DB from any point in my code (and a debugging enabled > > apache process), I wonder if there is a similar tool for mod_ruby, or a way > > to do remote debugging with plain cgi. > > If you run your app under Webrick (dispatch.servlet), you''ll have no > problem using the debugger. > > Florian Gross, who created "breakpoint", is working on genuine remote > debugging using DRb (distributed Ruby). That will make its way into > Rails via dev-utils in due course. That will presumably work with > mod_ruby and FastCGI. > > > Or, has anybody gone through the trouble to set up a test > > environment to run dispatch.cgi from the command line or gud? I > > figure I will try and do that if nothing else. I don''t want to > > reinvent the wheel. > > I don''t know about this. > > Cheers, > Gavin > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> It shows you how to use the production environment to load up your > models in irb. It''s not the same as remote debugging via perl -d and > apache, but it''s been useful for me.There''s a new helper script for this in 0.9. You''ll be able to do: script/envcon production That''ll start up a IRB session for the production environment with all the nice settings in there (auto-completion and no inspection). -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain
On Wednesday, December 8, 2004, 3:11:19 AM, David wrote:>> It shows you how to use the production environment to load up your >> models in irb. It''s not the same as remote debugging via perl -d and >> apache, but it''s been useful for me.> There''s a new helper script for this in 0.9. You''ll be able to do:> script/envcon production^^^^^^ what does this mean? I find "envcon" difficult to understand/remember. Is it the best name for the task? Gavin