Debugging with QTCreator
I've just built QT 5.7.1 and QTCreator 4.2.0 from sources and created my "Hello World" program just to make sure everything was okay. When I tried to build it, I had an error about some DLLs being missing such as QT5Cored.dll. I realised that I had only built a release version of qt and hence the error. Sure enough a release version of my little program built and ran fine. However, it struck me as odd that in order to debug my 5 line program (including blank lines) I need to also be able to debug all of Qt so I took the LIBS= line from Makefile.release and replaced the LIBS= line in Makefile.debug with it. My little program them built happily using that Makefile and I could debug it from within QTCreator quite happily as well. Obviously I can't debug the Qt libraries but lets be honest: If I write a program and there is a bug the chances are it will be in my code and not in the Qt code so I wondered is there any way to get QTCreator to build a debugging version of my code but use the release versions of libraries such as Qt. I did go through all the options in QTCreator but didn't see anything that seemed to do that. I guess I could add a LIBS = line to the project file but what libraries would need to be included? On a large project there could be a lot.
Anyway, if anyone knows of a way to just debug the code I write and not the Qt code when using QTCreator I would be very grateful if they could let me know.
Oh well, 5 months on, a new version of Qt (5.8.0) and QTCreator (4.3.0) and no replies. I guess having to debug Qt as well as my little programs is the way it is. It also means I need to install several GB of libraries that I will never actually step through just to debug my little libraries. I don't think this is a sensible design feature but then again; what do I know?
That's a question you can bring to the Qt Creator mailing list. You'll find there Qt Creator's developers/maintainers. This forum is more user oriented.
On a side note, it's pretty unusual to build both Qt Creator and Qt to start development. Most people either use the pre-built package using the online/offline installers or if on Linux, their distribution provided Qt. Why that path ?