Recently, I want to add some breakpoints and debug some ROS libraries step by step to learn how these functions are called. These ROS libraries have been built from source.
However, I found that all the member functions of libraries are linked to .h files and I cannot see what's inside these functions and the breakpoint inside the member functions are useless.
Is there any way to add breakpoints inside a library member function and observe how the library member function is running?
Following the instructions from @jabba, I built the current
main.cppand the third-party library with-DCMAKE_BUILD_TYPE=Debug, and the breakpoints worked,EDIT
i.e.,