简体   繁体   English

如何使用ruby mine debugger调试Rails应用程序?

[英]How to use ruby mine debugger to debug rails app?

I'm new to rails. 我是新手。 The current way that I do debug on rails is: 我在rails上进行调试的当前方式是:

  1. Run rails in rubymine in debug mode 在调试模式下在rubymine中运行rails
  2. Instead of putting a break point, I will put down "binding pry" in code 除了放置断点,我还将在代码中放置“绑定撬”
  3. Open terminal and type "rails c". 打开终端并输入“ rails c”。
  4. Trigger the specific state/event in terminal so I can get to the break point. 触发终端中的特定状态/事件,以便到达断点。

This is not my preferred workflow. 这不是我首选的工作流程。 It is tedious. 这很乏味。 I really like jet brain's debug mode when I can easily put down a break point, stop, evaluate expressions, look up all available objects, and step into a specific method. 当我可以轻松放下断点,停止,评估表达式,查找所有可用对象并进入特定方法时,我真的很喜欢喷射大脑的调试模式。 Is there anyway to do this with rails? 无论如何,用铁轨做到这一点?

So eventually I figured this out. 所以最终我弄清楚了。 Tools->Run Rails Console 工具-> Run Rails控制台

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM