# Debug

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/2026.3/llms.txt).

RubyMine provides a debugger for Ruby scripts, Rails applications, Rake tasks, and tests. Depending on the installed/enabled plugins, you can also debug code written in other languages, including ERB and HAML files. Depending on the [installed/enabled plugins](managing-plugins.html), you can also debug code written in other languages, including ERB and HAML files.

For Ruby 2.0+ projects, the RubyMine debugger uses the `debase` and `ruby-debug-ide` gems added to the [project interpreter](configuring-language-interpreter.html). RubyMine will suggest installing these gems when you [run debugging](starting-the-debugger-session.html) for the first time.

To install the debugging gems, RubyMine requires additional system libraries:

* Windows: [Ruby+DevKit](https://rubyinstaller.org/downloads/)

* macOS: Command Line Tools

* Linux: the `build-essential` package

RubyMine can also debug applications that use the `debug` gem. The `debug` gem requires Ruby MRI 2.6 or later.

> **Note: Other gems**
> Older Ruby versions (for example, Ruby 1.9) and JRuby may require different debugging gems and provide limited debugging capabilities.
>
>
>
> Using `byebug` or similar third-party debugging gems may affect the RubyMine debugger and cause slowdowns or unexpected behavior.

Procedure: General debugging procedure

[Video](https://www.youtube.com/v/8QXWPpuQe-Q)

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](run-debug-configuration.html).

3. Place [breakpoints](using-breakpoints.html) in your code.

4. [Start the debugger session](starting-the-debugger-session.html).

5. During a debug session, [examine](examining-suspended-program.html) the program state: see variable values, evaluate expressions, and so on. You can also use the [Debug console](using-debug-console.html) to do this.

6. [Step through the program](stepping-through-the-program.html).

