Closed gillisd closed 6 years ago
Looks like bootsnap was the culprit. Got things working now after commenting it out.
Yup, Bootsnap seems to bork it. Breakpoints would work in views for me, but nothing else. But what if you want to take advantage of Bootsnap and have the Rubymine debugger work?
Edit configurations
ENV['DEBUG_MODE']
variable that gets applied when the debugger boots Railsboot.rb
file:
require 'bootsnap/setup' unless ENV['DEBUG_MODE']
Now, if you boot Rails in plain old development mode you get to leverage Bootsnap. However, it's going to get disabled if you boot with the debugger.
Hope this helps someone.
@gillisd @matthaliski There is a fix that allows you to save the performance benefits https://youtrack.jetbrains.com/issue/RUBY-20684
Here's what I use as a more universal way of preventing bootsnap from loading during a debug session.
boot.rb
require "bootsnap/setup" unless ENV["RUBYLIB"]&.match?(/ruby-debug-ide/)
@GeorgeKaraszi solution is cool too (assuming they don't change the name or switch debugging gems 😉)
@gillisd @matthaliski could you please try the proposed solution of the problem(https://youtrack.jetbrains.com/issue/RUBY-20684), it seems to me that it is slightly better becouse it allows to remain bootnap's benefits
@gillisd @matthaliski But you can add something like Debugger.mp_load_iseq if ENV['DEBUG_MODE']
in your boot.rb
My debugger is no longer breaking at breakpoints in RubyMine 2017.3.3 after upgrading to Ruby 2.5.0. I'm using
v0.6.1
of this gem. I've also triedv0.7.0.beta3
andv0.7.0.beta2
, which cause the rails server to time out.