byebug: Incompatibility with Zeitwerk
Let me open this issue as a way to exchange impressions about this.
Zeitwerk listens to :class events to load what the project calls “explicit namespaces” (see why at this moment in my talk in RailsConf), but within a Byebug session, these events are not emitted.
Does Byebug need specifically to disable :class events, or could it disable others and preserve this one? If it needs them, could it be a way to make both projects compatible?
Right now, Rails 6 applications with common defaults have this gotcha, for example.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 7
- Comments: 18 (7 by maintainers)
Commits related to this issue
- Depend on ruby/debug, replacing Byebug ruby/debug is a new debugger that is going to ship with CRuby. It makes sense for Rails to switch to this one because that is where the language is heading, an... — committed to rails/rails by fxn 3 years ago
- Depend on ruby/debug, replacing Byebug ruby/debug is a new debugger that is going to ship with CRuby. It makes sense for Rails to switch to this one because that is where the language is heading, an... — committed to jyoun-godaddy/activestorage by fxn 3 years ago
- Add ruby debug as an alternative to pry/byebug I kept hitting this undefined constant error, see https://github.com/deivid-rodriguez/byebug/issues/564 to use debug insert `binding.break` — committed to pulibrary/figgy by hackartisan 7 months ago
- Add ruby debug as an alternative to pry/byebug I kept hitting this undefined constant error, see https://github.com/deivid-rodriguez/byebug/issues/564 to use debug insert `binding.break` — committed to pulibrary/figgy by hackartisan 7 months ago
@brasic unfortunately the TracePoint part in byebug is implemented in C which is way above my pay grade so I can’t contribute 🥲
Here’s hoping someone will be interested in picking this up. I really love byebug and pry and can’t imagine working without them. It’s probably one of the most important libraries in my developer career 😅
Hey guys I came up with a solution. Your reviews & testing are welcome https://github.com/deivid-rodriguez/byebug/pull/847
@deivid-rodriguez please
rake docker:build_allfrom my branch to update container images for testing. I added Ruby 3 boxes and bumped the ruby versions in 2.x containers.@zreisman could you paste a snippet of the code you used to get break to work? It would help those folks like me who’ve run into this problem to get debugging to work again.
Ah! I forgot @palkan investigated this and left some comments in https://github.com/fxn/zeitwerk/issues/31#issuecomment-479996317.