本文介绍了在工头上工作时,是否有可靠的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一个类似于使用binding.pry的工具的一些建议。
I'm looking for some suggestions on a tool similar to using binding.pry.
我正在本地向工程师工作,并希望完成在我的代码中放置调试器的能力相同,当进程命中时,冻结并打开该代码段中的控制台环境。
I'm serving a rails app locally with foreman and would like to accomplish the same ability to put "debuggers" in my code and when the process hits that, freeze and open a console environment in that section of the code.
如果还有其他已知的工具,我没有通过谷歌找到,那么用工头撬起工头就没有用了,好奇了吗?
I've tried using pry with foreman to no avail and was curious if there are other known tools I'm not finding through google?
感谢您的建议。
推荐答案
尝试,似乎是与工头一起运行Pry的答案。
Try pry-remote, it seems to be the answer of running Pry with Foreman.
清单:
- 确保您使用
binding.remote_pry
而不是binding.pry
。 - 确保运行您的程序,使binding.remote_pry先运行,然后在控制台中运行
remote-pry
,否则撬ver将不会运行。 - 如果没有任何帮助,请尝试添加
require'pry-remote'
在您的.rb
文件。 - 另请参阅。
- Make sure you're using
binding.remote_pry
instead ofbinding.pry
. - Make sure to run your program making binding.remote_pry first and then run in console
remote-pry
, otherwise the pry server won't be running. - If nothing helps, try adding
require 'pry-remote'
at the top of your.rb
file. - Check also this issue.
这篇关于在工头上工作时,是否有可靠的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!