Right now, when I want a breakpoint in vim or Sublime Text, I throw the following line into the code:
binding.pry if Rails.env.test?
Pry (and its related plugins ) provide a nice environment for doing Ruby interactive debugging from the command line.
However, adding the actual code to my projects to create each breakpoint (and remembering to delete that code when committing) can be cumbersome.
I like that vim-ruby-debugger does this in terms of removing the visual breakpoint in the editor without actually changing the source code of the project, I had some problems making it work in the context of my specifications (and I would rather just use the dots breakpoint Pry) first).
So, the question is whether it is possible to drop the binding.pry link into the file, so that an editor such as Vim (or Sublime Text, etc.) will pick it up and react accordingly while debugging without the actual line being included in the source the code?
user456584
source share