https://github.com/pry/pry
非常强大。可以非常容易的查看源代码和debug以前一直使用ruby-debug,现在有了pry更为方便了。
如下是几个常用的命令help cd Article cd first cd name nesting exit ls ls -h ls -m ls -M ls Array -M show-doc Article#in_groups_of show-doc all show-doc all.in_groups_of show-method all.in_groups_of edit-method all.in_groups_of .ls .cat Gemfile
讯享网
debu**使用代码是
讯享网binding.pry
gem install pry pry-doc与Rails结合
讯享网#Gemfile gem 'pry-rails'
如何使用pry 调试 Rails
gem 'pry-remote' gem 'pry-nav'
2, 在项目目录下,新建.pryrc文件
讯享网Pry.commands.alias_command 'c', 'continue' Pry.commands.alias_command 's', 'step' Pry.commands.alias_command 'n', 'next'
就可以使用 n s n运行命令了

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/26274.html