Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubymine breakpoints no longer working after upgrading Ruby to 2.5.0 #139

Closed
gillisd opened this issue Mar 15, 2018 · 7 comments
Closed

Rubymine breakpoints no longer working after upgrading Ruby to 2.5.0 #139

gillisd opened this issue Mar 15, 2018 · 7 comments

Comments

@gillisd
Copy link

@gillisd gillisd commented Mar 15, 2018

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 tried v0.7.0.beta3 and v0.7.0.beta2, which cause the rails server to time out.

@gillisd
Copy link
Author

@gillisd gillisd commented Mar 16, 2018

Looks like bootsnap was the culprit. Got things working now after commenting it out.

@gillisd gillisd closed this Mar 16, 2018
@matthaliski
Copy link

@matthaliski matthaliski commented Apr 4, 2018

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?

In Rubymine:

  1. Click Run > Debug
  2. Choose Edit configurations
  3. Add an ENV['DEBUG_MODE'] variable that gets applied when the debugger boots Rails

image

  1. Edit your boot.rb file:
require 'bootsnap/setup' unless ENV['DEBUG_MODE']
  1. Be happy

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.

@ViugiNick
Copy link
Collaborator

@ViugiNick ViugiNick commented Apr 5, 2018

@gillisd @matthaliski There is a fix that allows you to save the performance benefits https://youtrack.jetbrains.com/issue/RUBY-20684

@GeorgeKaraszi
Copy link

@GeorgeKaraszi GeorgeKaraszi commented Apr 10, 2018

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/)

@matthaliski
Copy link

@matthaliski matthaliski commented Apr 10, 2018

@GeorgeKaraszi solution is cool too (assuming they don't change the name or switch debugging gems 😉)

@ViugiNick
Copy link
Collaborator

@ViugiNick ViugiNick commented Apr 10, 2018

@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

@ViugiNick
Copy link
Collaborator

@ViugiNick ViugiNick commented Apr 10, 2018

@gillisd @matthaliski But you can add something like Debugger.mp_load_iseq if ENV['DEBUG_MODE'] in your boot.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants