New release 0.4 is uploaded to gem server. Thanks to Pascal for providing a valuable feedback and suggestions for this release.
What's new?
sa[ve] FILE command saves current breakpoints and checkpoint to a script file.
sc[ript] FILE command runs a script file. Note that script file can contain only control commands: add/remove breakpoints, interrupt program or thread, etc.
l[ist] on/off command. I don't know about you, but when I step through my application I immediately need to use list command to see where I am in the source code. Now if you use list on, ruby-debug will start doing this for you. To turn it off, use list off.
e[val] on/off command. When it's on*, ruby-debug will evaluate your input if it doesn't recognize it as one of the commands. To turn it off, use *eval off.
tm[ate] n command now accepts a frame number.
Note that in my last announcement I forgot to mention that if you don't want to use rdebug script to start debugger and instead prefer to require 'ruby-debug', now you must activate debugger explicitly by running Debugger.start or Debugger.start_remote method. Also, if you want to debug just a small part of your application, you can wrap it in a block and pass it to Debugger.start method. When start method finishes, it disactivates debugger. For example:
...
Debugger.start do
# code you want to debug goes here
...
end
Enjoy.
Kent, this looks great! I wish I’d known about ruby-debug a week ago—I’d have put it into my RubyConf*MI presentation.
I plan on trying to get ruby-debug into my regular hacking next week (once I’m home again). It looks like a great extension to the stock debugging tools.