# 调试分叉的进程

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

> **TL;DR**
> 工具链  ：本地 Linux、 [WSL](how-to-use-wsl-development-environment-in-product.html)、 [远程](remote-projects-support.html)、 [Docker](clion-toolchains-in-docker.html)
>
>
>
> 调试器  ：GDB / LLDB

在 CLion 中，您可以调试使用  `fork`  函数创建的子进程。 使用   线程与变量   窗格的上下文菜单来设置跟随和分离策略：

![多进程调试的跟随/分离策略](https://resources.jetbrains.com/help/img/idea/2026.3/cl_debugforkedprocesses.png)

这些全局设置会更改调试器的行为。

请注意，LLDB 仅允许一次调试一个进程，因此对于 LLDB，总是选择   在 fork 时分离进程  。 GDB 允许多个连接并在它们之间切换。

> **Tip:**
> 请参阅 [使用 GDB 调试分叉](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Forks.html)。

## See also

### 流程

[调试工具窗口](debug-tool-window.html)

