How to debug ruby code?

后端 未结 9 2179
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 15:04

I run Ubuntu 10.10. I just want to debug a simple script. After spending half a day trying to figure out how that could be done I give up. What the heck am I supposed to do?

9条回答
  •  离开以前
    2020-12-28 16:00

    The best debugger I've ever used for Ruby is the one built in to Netbeans. You have to install the fast ruby debugger gem from Netbeans (I'm not sure which gem it actually is, but Netbeans prompts you to do it). I find that it works much better if you switch Netbeans away from the built-in JRuby 1.4 to your system's default Ruby installation. There's also the breakpoint gem that's worth taking a look at, and using the Ruby built-in library logger from the start of your development is also helpful. Good luck!

提交回复
热议问题