Hi folks, I''ve just installed rdebug in emacs and it works fine for ruby scripts, but I cannot get it to work in a Rails application. Is this doable? If so, what are the instructions for it? Thanks in advance, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Houman Dunnil wrote:> Hi folks, > > I''ve just installed rdebug in emacs and it works fine for ruby > scripts, but I cannot get it to work in a Rails application. Is this > doable? If so, what are the instructions for it? > > Thanks in advance,Although the real guru''s here may correct this, I''m doubting you''re going to be able to do it in emacs. The debugger works through the console that is used to start the test server. It''s enabled by using the --debugger (or -u) option: ruby script/server --debugger The debug output and control will then be seen on the console where you started the server. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This is a little bit dated but the way to go is here: http://www.datanoise.com/articles/2006/7/12/tutorial-on-ruby-debug The only basic difference when running in emacs is you want to start your server (script/server) from inside a shell window like this: M-x shell $ cd your_project_root $ script/server I''ve used this method with ruby 1.8.7 / rails 2.2.2 and it definitely works. Unfortunately for me, I''m working with ruby 1.9.1p0 and ruby- debug hasn''t quite made it there yet. Not sure what you''re using for emacs but I''ve found aquamacs (cocoa build on emacs 22.3.1) to work quite nicely on OSX. What are you doing to get your "rails-mode" functionality? I''ve used rinari and am currently working with emacs-rails - both located by google. I''ve needed to noodle emacs-rails a bit to get it to do something reasonable with menu driven rspec variants. Let me know how it works out for you. On Apr 5, 2:56 am, Houman Dunnil <h.dun...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi folks, > > I''ve just installed rdebug in emacs and it works fine for ruby > scripts, but I cannot get it to work in a Rails application. Is this > doable? If so, what are the instructions for it? > > Thanks in advance,--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sun, Apr 5, 2009 at 11:19 PM, Rick <Richard.T.Lloyd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > This is a little bit dated but the way to go is here: > > $ script/serverThis should be script/server -u to enable debugging. -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Actually, the example I cited had two steps to it: 1) add "require ''ruby-debug'' to "config/environments/development.rb" 2) add "debugger" to the your application file of interest just before you want the debugging session to start This removes the need for the -u flag to script/server and enters the debugger at the point of interest. Obviously you can use -u, enter the debugger at the beginning of the program, set a breakpoint at the point of interest, and run forward to the breakpoint. On Apr 6, 4:58 am, Greg Donald <gdon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Apr 5, 2009 at 11:19 PM,Rick<Richard.T.Ll...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > This is a little bit dated but the way to go is here: > > > $ script/server > > This should be > > script/server -u > > to enable debugging. > > -- > Greg Donaldhttp://destiney.com/--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---