RubyMine 2022.3 Help

Debug

RubyMine provides a debugger for Ruby code, including the ERB and HAML files. Debugging Ruby 2.0+ projects requires the debase and ruby-debug-ide gems installed in the project SDK. If these gems are not installed, RubyMine will suggest doing this when you run debugging for the first time.

Using debug, byebug, or a similar debugging gem in your project may affect the RubyMine debugger. We recommend disabling such gems to prevent slowdowns or unexpected behavior.

General debugging procedure

  1. (Optional) Configure the debugger settings in the Settings | Build, Execution, Deployment | Debugger page.

  2. If necessary, create or modify an existing run/debug configuration.

  3. Place breakpoints in your code.

  4. Start the debugger session.

  5. During a debug session, examine the program state: see variable values, evaluate expressions, and so on. You can also use the Debug console to do this.

  6. Step through the program.

Last modified: 16 January 2023