Howdy, I''m trying to get the ruby debugger to breakpoint at a specific line in source. Here''s what I did: - Added require "ruby-debug" in spec_helper.rb - Added gem dependency to Gemfile (gem "ruby-debug" - In the spec, added before do breakpoint; 0; end - Ran it with rspec spec/models/myspec.rb -d Here''s what I see - spec runs, but the debugger isn''t invoked, and nothing pauses/halts for me to inspect. I''m on - MacOSX - ruby-debug 0.10.4 - rspec 2.5.0 - rails 3.0.4 Any ideas? Cheers, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110304/28664c72/attachment.html>
On Mar 3, 2011, at 11:44 PM, Jason Nah wrote:> Howdy, > > I''m trying to get the ruby debugger to breakpoint at a specific line in source. > > Here''s what I did: > Added require "ruby-debug" in spec_helper.rbYou don''t need this ^^.> Added gem dependency to Gemfile (gem "ruby-debug" > In the spec, added before do breakpoint; 0; endUse "debugger" instead of "breakpoint".> Ran it with rspec spec/models/myspec.rb -dThis is correct ^^. HTH, David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110304/21fbcb10/attachment.html>
Hi David, I found the problem. I had --drb option on, which caused all sorts of problems with the debugger. It would just skip right through the breakpoint/debugger statements with the --drb option on. Even though spork wasn''t running. Removing the option got the debugger back on track. Cheers, Jason On 4 March 2011 21:47, David Chelimsky <dchelimsky at gmail.com> wrote:> On Mar 3, 2011, at 11:44 PM, Jason Nah wrote: > > Howdy, > > I''m trying to get the ruby debugger to breakpoint at a specific line in > source. > > Here''s what I did: > > - Added require "ruby-debug" in spec_helper.rb > > You don''t need this ^^. > > > - Added gem dependency to Gemfile (gem "ruby-debug" > - In the spec, added before do breakpoint; 0; end > > Use "debugger" instead of "breakpoint". > > > - Ran it with rspec spec/models/myspec.rb -d > > This is correct ^^. > > HTH, > David > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110304/56b53a4d/attachment.html>