Shopify/packwerk

Drop into a debugger when encountering a `debugger` call

wildmaples opened this issue · 0 comments

When you want to debug Packwerk for a specific context (file + constant), it's quite difficult to do without running a debugger for all contexts. What if we dropped into a debugger whenever we see an AST node that is a call, for a method named debugger, and no arguments?

These are generally not found in code that gets committed, so it should be non-intrusive, but best to scope it behind a flag/subcommand to be safe.