What do you guys use for debugging in ruby 1.9? rdebug doesn't seem to be compatible.. is there anything out there?
Some things you could try
1) run it with ruby’s normal debugger -rdebug [1] kind of slow
2) run it with unroller gem [kind of stinks, way slow]
3) use a lot of print statements fast, kind of less introspection possible
4) drop to an irb prompt and run some code from there.
you could list the code by creating your own “drop to irb prompt” that listed the code around itself [use caller to discover where you where] then drop to a normal irb prompt.
5) maybe jruby in 1.9 compat mode has a debugger?
ruby-debug is now available with Ruby 1.9.x. See http://www.github.com/mark-moseley
The ruby 1.9.1-p243 version is out and compitable ruby-debug-ide is also working properly. Install ruby-debug-ide using the following command:
gem install ruby-debug-ide
This will install the ruby-debug-base19 and ruby-debug-ide gems. But before this make sure you install the mingw successfully by following the Development kit docs available from RubyForge.
Just an add on about this with rvm, ruby 1.9.1-p378. True story is that even if ruby-debug is 1.9.x ready, linecache-0.43 is not. The solution is to install:
gem install ruby-debug19
This solves the problem for me.
If you still have a problem after installing ruby-debug19 try updating ruby-debug-base19. I had errors and couldn't run WEBrick in debug mode until I did that.
gem update ruby-debug-base19
Oh, and thanks Mr. Moseley for all your hard work!
What about stand alone passenger? Have anyone succeeded in running passenger 3.0 (standalone) with ruby-debug(19) and ruby1.9?
I get this error message: "Your version of ruby-debug is too old. Please upgrade to the latest version."
And this is because of this code in passenger / utils.rb:
if !Debugger.respond_to?(:ctrl_port)
raise "Your version of ruby-debug is too old. Please upgrade to the latest version."
end
Any ideas how this could be solved?
p.s. it works with WEBrick