byebug icon indicating copy to clipboard operation
byebug copied to clipboard

Byebug 9 and 10 stopping in internal Rails code instead of where I add the byebug call

Open dillonwelch opened this issue 6 years ago • 4 comments

Problem description

Any version of byebug > 8. Rails 5.2 Ruby 2.5.1

When I add a byebug call, it stops in a (seemingly) random context that's not where I put the call. For example, I've gotten into ActiveSupport before. I'm unable to access local variables/methods/etc, making debugging impossible.

Expected behavior

Byebug stops in the context where I add the call.

Actual behavior

Byebug stops in some other context.

Steps to reproduce the problem

For me at least it's just adding a byebug call when on a version other than 8. If there's something particular I can provide to help please let me know.

dillonwelch avatar Jun 14 '18 02:06 dillonwelch

This is due to bootsnap being integrated in Rails 5.2. See https://github.com/deivid-rodriguez/byebug/issues/452

francoisjacques avatar Jun 21 '18 15:06 francoisjacques

Thanks for the link. I couldn't quite tell from the discussion, is it planned to be fixed or is the fix just to change those bootsnap settings?

dillonwelch avatar Jun 22 '18 17:06 dillonwelch

Try the bootsnap settings. It wasn't enought for me but apparently was good enough for others. Please report back if you still have issues with the bootsnap settings, this way I won't be the only one with that problem :-)

francoisjacques avatar Jun 22 '18 20:06 francoisjacques

Something about those settings changes the loading order (or something) of my app code and my app won't even boot due to missing classes.

dillonwelch avatar Jun 23 '18 19:06 dillonwelch