How to debug a forked child process using CLion

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:

  1. Set a break point at the beginning of your program (ie. the parent program, not the child program).

  2. Start the program in the debugger.

  3. Go to the debugger console (tab with the label gdb) in clion and enter set follow-fork-mode child and set detach-on-fork off.

  4. Continue debugging.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)