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?
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
Try using command line debugger: https://github.com/cldwalker/debugger
See also
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.