How to debug a plugin / gem? (with useful notes to setup and use ruby-debug gem)

£可爱£侵袭症+ 提交于 2019-12-05 12:33:31

I highly recommend you learn to use ruby-debug. You can install it by doing:

gem install ruby-debug

You can then add a debugger statement to your code either in the plugin code or where your code calls the plugin, step through it, and see what's going wrong.

I also personally use these settings which makes it a bit easier to use - put them in a ~/.rdebugrc file.

set autoeval
set autolist
set autoreload
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!