binding_of_caller

binding_of_caller works hand-in-hand with better_errors to provide live REPL sessions inside error pages, allowing developers to inspect and manipulate program state at the moment an exception is raised. 

Setup is straightforward: include it in development, and it automatically enhances better_errors when installed together. It supports Rails 6, 7 and 8 on Ruby 3+. 
 
It provides deeper insight into runtime state and highly interactive debugging, however, it is limited standalone without better_errors.