# Attach to process

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

> **TL;DR**
> `Run | Attach to Process` `Ctrl+Alt+F5` (Windows), `⌥ ⇧ F5` (macOS), `⌥ ⇧ F5` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ F5` (macOS System Shortcuts), `Ctrl+Alt+5` (XWin), `Ctrl+Alt+5` (GNOME), `Ctrl+Alt+5` (KDE), `Ctrl+Alt+F5` (Emacs), `Ctrl+Alt+F5` (Sublime Text), `⌥ ⇧ F5` (Sublime Text (macOS)), `Ctrl+Alt+P` (Visual Studio), `⌘ ⌥ P` (Visual Studio (macOS)), `Alt+Shift+F5` (TextMate), `Ctrl+Alt+F5` (NetBeans), `Ctrl+Alt+F5` (Eclipse), `⌥ ⇧ F5` (Eclipse (macOS))

> **Note:**
> For Linux users, the native SDK should be added to the list of available SDKs in the [Ruby SDK and Gems](configuring-language-interpreter.html) page of the Settings dialog. This way, the native SDK will be detected by RubyMine and suggested for use in an external script.
>
>
>
> Note that the native SDK is not supported for macOS for security reasons.

RubyMine provides a way to attach the debugger to both local and remote processes.

> **Note:**
> If you want to debug a program that can be started from RubyMine, the best way to do it is to [start a local debugging session](starting-the-debugger-session.html).

Procedure: Prerequisites

Attach to process requires the following components to be installed on the development machine:

* If you use Linux, install [GDB](https://www.gnu.org/software/gdb/).

* If you use macOS, make sure that [LLDB](http://lldb.llvm.org) is installed. Note that LLDB requires the six Python module, which may be missing in your macOS installation.

> **Tip:**
> Note that Attach to process is not supported on Windows.

## Attach to a local process

Procedure:

1. Press `Ctrl+Alt+F5` (Windows), `⌥ ⇧ F5` (macOS), `⌥ ⇧ F5` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ F5` (macOS System Shortcuts), `Ctrl+Alt+5` (XWin), `Ctrl+Alt+5` (GNOME), `Ctrl+Alt+5` (KDE), `Ctrl+Alt+F5` (Emacs), `Ctrl+Alt+F5` (Sublime Text), `⌥ ⇧ F5` (Sublime Text (macOS)), `Ctrl+Alt+P` (Visual Studio), `⌘ ⌥ P` (Visual Studio (macOS)), `Alt+Shift+F5` (TextMate), `Ctrl+Alt+F5` (NetBeans), `Ctrl+Alt+F5` (Eclipse), `⌥ ⇧ F5` (Eclipse (macOS)) or select `Run | Attach to Process` from the main menu.

2. RubyMine will show the list of the running local processes.  Select the process to attach to.

![Select a process to attach](https://resources.jetbrains.com/help/img/idea/2026.3/rm_attach_process.png)

When there are too many processes, you can narrow down the list by typing the first letters of the process name or PID.

3. Proceed with [debugging](debugging-code.html) the same way as you usually do it in RubyMine ([set breakpoints](using-breakpoints.html#set-line-breakpoint), [step through](stepping-through-the-program.html),   [pause and
resume](starting-the-debugger-session.html#pause-resume-debugger) the process, [evaluate expressions](examining-suspended-program.html#evaluating-expressions) , and so on).

Note that in case the process you have attached to does not provide debug information, breakpoints will be unavailable and stepping will be performed in the [disassembly](null) view.

## Detach from the process

The steps to detach from a remote process are the same as for stopping a local debug session. However, unlike local sessions, the target process continues to run after the debugger detaches.

Procedure:

* Click the Stop ![the Stop button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.stop.svg) button on the Debug tool window's toolbar on in the [Debug tool window](debug-tool-window.html).

* Alternatively, click Stop ![the Stop button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.stop.svg) on the main toolbar or press `Ctrl+F2` (Windows), `⌘ F2` (macOS), `⌘ F2` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ .` (macOS System Shortcuts), `Ctrl+F2` (XWin), `Ctrl+F2` (GNOME), `Ctrl+2` (KDE), `Ctrl+F2` (Emacs), `Ctrl+F2` (Sublime Text), `Ctrl+F2` (Sublime Text (macOS)), `Shift+F5` (Visual Studio), `⇧ F5` (Visual Studio (macOS)), `Ctrl+\` (TextMate), `Shift+F5` (NetBeans), `Ctrl+F2` (Eclipse), `⌘ F2` (Eclipse (macOS)), then select the session to be closed.

## See also

### Reference

[Debug tool window](debug-tool-window.html)

