How to debug ruby code?

后端 未结 9 2188
伪装坚强ぢ
伪装坚强ぢ 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 15:44

    Ruby debugging has a difficult history, littered with tools that only support a specific minor version of MRI. Thankfully, for 2.0 and onward, you can use byebug.

    Command-line usage is simple: run byebug . You can also edit your file and drop the byebug function call in wherever you want to launch debugging.

提交回复
热议问题