Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging into external libraries in QtCreator

I have been using Qt Creator to develop some Qt apps recently with no problems. This week I started to use Qt Creator to work on an Open Scene Graph application. I have all of the source (.cpp and .h) files for Open Scene Graph and used those to build the libraries.

I then created a new project and linked those libraries into my project through the .pro file. My application works and runs, I can debug but not step into the code from the Open Scene Graph libraries.

How can I set up Qt Creator to step through these source files or even break at breakpoints within the source code of these libraries?

In Tools -> Options -> Debugger, there is Source Paths Mapping which may be what I'm after but I'm not sure.

Thanks.

like image 241
mdoran3844 Avatar asked Sep 04 '13 05:09

mdoran3844


1 Answers

I assume since you can link a debug version of your app with OSG and you can't trace into OSG source code that you're using gcc (because with Visual C++ I don't think it's possible to link debug apps with non-debug libs) If that's the case, you simply need to re-build OSG for debugging. There may be an option when you run OSG's 'configure' or you may have to edit the Makefiles. Or if it's CMake-based, you run cmake with -DCMAKE_BUILD_TYPE=Debug.

like image 153
Scott Avatar answered Nov 15 '22 05:11

Scott