How to configure the Run / Debug (C++)
Answered
1) How can I configure the run/Debug for a project that has the following steps to be built:
./autogen.sh && ./configure <flags> && make -j "$(($(nproc)+1))"
Since the first two steps are used only once, just the last is needed to be used in CLion to rebuild the app.
And the debug itś done by gdb <executable> and then, run -<params>.
2) How can I configure the debug and the params that will be passed in the run command ?
3) The project also generate 4 executable. Is it possible to configure it in a way that the executable can be choose in the run/debug command ?
Please sign in to leave a comment.
Hello!
1) You need to perform ./autogen.sh and ./configure outside CLion and then open the resulted Makefile in CLion.
2 and 3) You can configure that in you run/debug configuration: https://www.jetbrains.com/help/clion/run-debug-configuration.html, https://www.jetbrains.com/help/clion/run-debug-configuration-makefile-application.html.
These articles also might be useful: https://www.jetbrains.com/help/clion/makefiles-support.html, https://www.jetbrains.com/help/clion/debugging-code.html