在工头上工作时,是否有可靠的工具 [英] Is there a reliable tool for stepping through code while serving in foreman

查看:141
本文介绍了在工头上工作时,是否有可靠的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个类似于使用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-remote ,似乎是与工头一起运行Pry的答案。

Try pry-remote, it seems to be the answer of running Pry with Foreman.

清单:


  1. 确保您使用 binding.remote_pry 而不是 binding.pry

  2. 确保运行您的程序,使binding.remote_pry先运行,然后在控制台中运行 remote-pry ,否则撬ver将不会运行。

  3. 如果没有任何帮助,请尝试添加 require'pry-remote'在您的 .rb 文件。

  4. 另请参阅问题

  1. Make sure you're using binding.remote_pry instead of binding.pry.
  2. 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.
  3. If nothing helps, try adding require 'pry-remote' at the top of your .rb file.
  4. Check also this issue.

这篇关于在工头上工作时,是否有可靠的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆