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

Most upvoted comments

@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_all from 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.