1
votes

I'm new to rails. The current way that I do debug on rails is:

  1. Run rails in rubymine in debug mode
  2. Instead of putting a break point, I will put down "binding pry" in code
  3. Open terminal and type "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?

1
Why aren't you putting the breakpoint down, again? - Makoto
so you can debug? when you put down break point, your program will stop at a specific line so you can inspect all objects. - user3019766
Yes. That's the point of the debugger. Why aren't you putting the break point down? - Makoto
Apologies for able to understand your question. "put down break points" means I'm setting the breakpoint mark on my IDE next to line of code so I before running that line, i would be able to enter debug mode and inspect all objects. I did put down break point, but in order to reach to those break points, I would have to trigger in terminal to trigger certain events. But when these events are being triggered, the break points doesn't break. - user3019766
Clarify this in your question then - it legitimately tripped me up when you said, "Instead of putting a break point...". - Makoto

1 Answers

2
votes

So eventually I figured this out. Tools->Run Rails Console