Shared library + executable debugging


I am new to Clion and CMake. I am trying to reconstruct the following functionality from the Eclipse world:

1. Create a C/C++ shared library project
2. Create a C/C++ executable project.
3. Link projects together.
4. When debugging the executable and entering the shared library code, the shared library is debugged.


So in a nutshell, I was wondering whether it is possible to debug an executable and a shared library that the executable is using at the same time?

I would appreciate all feedback!

1 comment

Lukasz Przenioslo

You should be able to step into the library with the debugger as long as you're linking to a version that was built with debugging info, i.e. a CMake Debug build. This works for static libraries at least, I'm not completely sure about shared libraries.


Please sign in to leave a comment.