Debug forked processes
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 Follow/detach policies
for multiprocess debug](https://resources.jetbrains.com/help/img/idea/2024.1/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.
Last modified: 14 March 2024