This morning was spent trying to find a way around the "breakpoint not supported' in this release of ruby... as a nuby, I'll definitely need the debugger to help me figure out what's going on.
After much searching in the forums, I found a Google Groups thread that seemed to capture what I was looking for. I followed the recommendations and am a little farther along than I was before, but two hours later, I still don't have the debugger working. Here's what I've got so far:
>>Install the debugger package (works just fine; no indication of the problem with overlaying 1.2.2 modules presented in the thread)
gem install ruby-debug-base
>>Modify the code to be debugged (Note the use of 'ruby-debug-base'; using 'ruby-debug' generates a file not found error)
require 'ruby-debug-base'
Debugger.start
...
debugger
At least this gives a clean compile, but there's no breakpoint generated that I can see.
More as I get it to work...
ruby-debug uses a custom client. I believie it is called rdebug or something. As soon as it is connected you will probably want to enter 'irb'.
ReplyDeleteAnother solution might be to continue using ruby-breakpoint, but with Breakpoint.breakpoint(nil, binding) instead of breakpoint().
Hope that helps!
Thanks, Florian... I posted this question on Ruby on Rails: Talk and got some great feedback. You're correct that the rdebug appreoach seems to be the preferred method: Kent Sibilev gave me the scoop:
ReplyDeleteC:\rails-app>rdebug ./script/server
and you're good to go!
Just found an extensive discussion on the Rails wiki on
ReplyDeleteHowToDebugWithBreakpoint. Haven't tried it out, but it looks very interesting.