I followed answer posted by @MarkusParker, but instead of set auto-load safe-path / I used set detach-on-fork off to prevent disconnect from child process. This instruction works for me:
-
Set a break point at the beginning of your program (ie. the parent program, not the child program).
-
Start the program in the debugger.
-
Go to the debugger console (tab with the label gdb) in clion and enter
set follow-fork-mode childandset detach-on-fork off. -
Continue debugging.