I want to debug my Ruby code using the Ruby Mine IDE. In the drop down list Select Run/Debug Configuration, I chose My Project - development, then pressed Shift + F9. The Debugger started well, but did not stop at my break points. Why?
3 Answers
Ensure your Gemfile contains this:
gem 'linecache19', '>= 0.5.13', :git => 'https://github.com/robmathews/linecache19 0.5.13.git'
gem 'ruby-debug-base19x', '>= 0.11.30.pre12'
gem 'ruby-debug-ide', '>= 0.4.17.beta17'
maybe for details see that answer
1 Comment
Try using command line debugger: https://github.com/cldwalker/debugger
See also
1 Comment
pry is an interactive Ruby shell (or "REPL"), which can be used as a debugger (best combined with the pry-nav and pry-stack_explorer gems). It has a lot of features which make it much nicer to use than the debugger gem. For general exploration and experimentation with Ruby code, it's also nicer to use than irb.
For more info:
After adding pry to your Gemfile and bundling, you can add a "breakpoint" with the following Ruby code: binding.pry