# Debug forked processes

> **TL;DR**
> Toolchain: local Linux, [WSL](how-to-use-wsl-development-environment-in-product.html), [Remote](remote-projects-support.html), [Docker](clion-toolchains-in-docker.html)
>
>
>
> Debugger: GDB / LLDB

In CLion, you can debug child processes created with the `fork` function. Use the context menu of the Threads & Variables pane to set up the follow and detach policies:

![Follow/detach policies
for multiprocess debug](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugforkedprocesses.png)

These global settings change the debugger’s behavior.

Note that LLDB allows debugging only one process at a time, so the Detach Process on Fork is always selected for LLDB. GDB allows multiple connections and switching between them.

> **Tip:**
> See [Debugging forks with GDB](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Forks.html).

## See also

### Procedures

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

