What I usually want to see directly when I debug Ruby code and I cannot (or don't have time to set up the RDBG) is the variables and methods of the cu

Add Binding.break code snippet in RubyMine & VS Code

submited by
Style Pass
2024-05-16 09:00:04

What I usually want to see directly when I debug Ruby code and I cannot (or don't have time to set up the RDBG) is the variables and methods of the current object and the values of all instance variables and local variables at the breakpoint.

A better alternative for debugging is to use in RubyMine the integrated debugger or to use the VSCode rdbg Ruby Debugger in Visual Studio Code.

I am using the code snippet when I want a quick jump in to execute some custom code and the project is not configured to work with any of those debuggers. I sometimes take a look at open source Ruby on Rails projects and I want the fastest way to look at what's happening in some specific points in code.

Leave a Comment