I spent a good 45 minutes puzzled as to why byebug wasn’t working from within a gem I’m debugging. Even more confusing was that when I set byebug in the gem code along with some debugging code, and stepped into the gem, I saw my code edits along with the call to byebug… but the new code was never reached, it was as if it was being skipped right over. Odd.
Went for a cup of coffee and to ponder this….
Finally, I figured out that spring was preloading the app and keeping the gems loaded – even after I changed the gem code.
For now, I’m going to keep spring disabled by setting DISABLE_SPRING=1 in my .env file.
Latest posts by Chris Downey (see all)
- Dramatic improvement by replacing ActiveRecord loop with single SQL query - March 17, 2017
- Activist best practice: auto-archiving web pages - February 4, 2017
- Pre-calculating vaccine ingredients: from PostgreSQL to HTML data-* - February 1, 2017