Wouldn't it be great if I can set breakpoints right from within TextMate? I've been thinking about this myself for sometime.
And now I'd like to introduce a new Ruby Debug Bundle.
Note that in order to use it you must have the latest version (0.4.1 or higher) of ruby-debug installed.
How to use it?
Let's say you want to debug your Rails application.
Start your application with the remote debugging enabled:
$ rdebug -sn ./script/server webrickConnect to the debugger (in new terminal):
$ rdebug -c Connected.In TextMate go to the line where you want to set a breakpoint and press ⇧⌘B and select Set Breakpoint at Current Line.
Open your browser and start using your application until you reach the breakpoint.
That's it.
Currently, these commands are available:
- Set Breakpoint at Current Line
- Delete All Breakpoints.
- Show Breakpoints - show all breakpoints as a tooltip.
- Interrupt - interrupt the last debugged thread or, if there is no one, the main thread.
- Quit - quit application.