As a sub-question to this, I want to know, since Qt5 is distributed with full source code, is it possible to set up debugger break-points inside Qt itself?
Is there a symbol file shipped with Qt5 for the binary build? Do I have to build my own Qt to do this?
What is the fastest way to have breakpoints inside Qt5 working with QtCreator on Ubuntu?
You need to configure and build qt yourself with debug symbols. (-debug)
Then in QtCreator you can go to Options > Debugger > General and "Add the Qt-Sources".
Related
I'm looking for advice on QtCreator debugging.
My OS is Ubuntu 18.04 64bit and QtCreator 4.12.4. Qt version 5.12.4.
My issue is that when I run my code in debug mode, the debugger steps into and breaks inside Qt source library code. My question is how do I prevent stopping at breakpoints within Qt source library code because I have no interest in Qt source outside of my linking to the library.
I just want to be able to set breakpoints within my own code but QtCreator debug breaks within Qt library source and this is very distracting, making the debugger unusable.
Thanks in advance for your advice!
Phil
I am using Qt creator and cdb debugger for my c++ project. I need to set some breakpoints in code and see what happens during runtime. Unfortunately because of some third party library I absolutely can not use Debug mode so I have to stick to the release mode.
In visual studio I always do such thing and use breakpoints in the release mode easily but how could I do that in Qt creator?
(Versions: Qt 5.12 / Qt creator 4.8)
Try using a "Profile" build in Qt Creator. That will include separate debugging line information in a "Release" (optimized) build. You can then launch it using the Debug button in Qt Creator and set breakpoints as you need.
Caveats:
You may not be able to get the exact line you want because of optimizations by the compiler.
You most variables will be optimized into registers, so you can't view them. If you need to view registers, try the good, old fashion method of printing their values out with a qDebug() statement. (When in doubt, print it out.)
Using Qt version 5.7.0 for Desktop Windows 10
I can run can't use the debug option (F5), it displays in a dialog:
"D:/DEV Programas/build-GIFS-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug/debug/GIFS.exe": not in executable format: File format not recognized
I can't use at all the debugger. What can I do?
Sorry I don't display more information. I don't know much how Qt Creator works and what info you may need to help me.
you are in debug mode for build, but you are running the release executable you have to configure Qt Creator ->Project->run and the Add->custom Executable then choose the executable inside you debug directory see picture below
I've found the solution. I "just" had to reinstall Qt. Not Qt creator, but the framework itself. Now I can use the debugger.
I have a project, maintained in QtCreator, where one of the elements is a QtDesigner plugin (custom widget). The problem is, QtCreator is blocking this plugin (dll file) and I can't build the whole project - I can't even run it, as qmake knows there was an error (while copying the dll) and doesn't allow to run the final exe.
What can I do about it? Maybe there's a way to force QtCreator to unload the plugin? Or maybe there's a rule to allow the project to run, if the fail was only because of this?
Windows 7, Qt 5.3.2, x64, MSVC2013, QtCreator 3.3.2 built from sources (for x64).
I'm trying to use QtCreator as an IDE for Windows platform. So far I have managed to create a "kit" that uses cygwin's gcc compiler, and to build a non-qt "hello world" project. When I try to debug the project, I get
"The debugger could not load the debugging helper library."
error and can see only assembler code. I have installed QtCreator as a standalone application, so I don't have either qt lib or mingw. If anybody knows how to make QtCreator debug projects using cygwin's gdb, I would really appreciate it.
P.S: The reason why I want to use QtCreator as an IDE is that Eclipse's indexer fails on parsing boost sources, it eats up way too much memory and I have to turn it off to make the IDE operable. And neither autocomplete or navigation of the class hierarchy works without the indexer.