I cannot seem to start the built-in profiler, I have tried a number of settings and it still wont run. I get this message;
I have enabled qml debugging under 'Build Steps' like so;
I have also enabled it under 'Debugger Settings' (and followed the pre-requisites).
I have restarted, rebuilt, cleaned and re-ran qmake. I would appreciate any help.
Check Projects->(Whatever target)->Run settings and make sure the QML checkbox is set next to the debugger languages. Report back if this fixes your problem.
Related
I have recently installed Qt Creator 4.8.0 based on Qt 5.12.0 and I have it configured like in the image below. However, I haven't managed to start the debugger. As it can be seen, the debugger is correctly set for this kit, the one I'm using right now.
Any solution?
Thanks!
Wow! I found it!!! Here in the tab "projects", there are several build and run configurations. Despite you select a default kit, the final one being executed is the one in black under this tab.
Finally I disabled all of them except the one that was properly configured in the Kits window and it worked. I hope this information is helpful for someone. I don't think that part of the configuration is clear.
I got the same error, but in my case I was using the MSVC compiler and the kit didn't manage to find the CDB debugger. I was able to fix it by going to "Add or remove programs" -> "Windows Software Development Kit" -> Modify -> Change -> Debugging Tools for Windows.
In my case it was needed to select "Enable C++" under Debugger settings
screenshot
The same dumm error QT creator shows when you simply don't have gdb installed.
Worked in my case ;)
I had the same error in MacOS, debugger suddenly stopped working (LLDB debugger worked in XCode but not Qt Creator).
In this case, I reinstalled Qt Creator and reinitialized the config by removing the .config/QtProject directory located in homedir. This solved the problem.
I had the same issue when Qt Creator didn't recognized the path to the Debugger. Due to some reason it showed multiple Auto-detected Debuggers at the same location. And on the top one of the list with the red error indicator.
see
Projects->Manage Kits...->Debuggers
I removed the erroneous Debugger and restart the Qt Creator.
my Qt (QML/C++) application crashes and I can not find the reason why. I tried to output a lot of information but some signal/slot connection probably causes a crash. I spent many hours trying to find the reason but I failed.
The only good point is that I can reproduce the crash whenever I want.
Unfortunately I don't know hot to use the included GDB debugger. This is the output I got:
How do I find from this what happened and where? I need to find at least the function, in which my application crashed.
Or what else could I try? Unfortunately I can not disable the signal/slot connections or the associated functions, because then I can not get to the point, where it crashes.
Qt has detailed documentation on how to install a debugger found here: QtCreator Debugger
MingW does have a GDB that can be used to debug the application better. You can also use CDB to debug, just depends on your preference.
Once that is installed, you'll be able to set breakpoints and check variable information to see where your program is crashing using the Debugger view in QtCreator.
Tools->Options->Build & Run
If you have Qt version kit like this you need to check debuggers.
https://i.stack.imgur.com/LaY1p.png
https://i.stack.imgur.com/8kTG6.png
You need to install MinGW and after install you will be have debugger. After install press F5 to start debuging.
I'm trying to use QT Creator for an open-source project I downloaded from github.
After some fuddling around I managed to get the project to compile in QT Creator and run in debug mode.
However, I have an issue : strangely the breakpoints that I set are only available for that instance for the debug run for QT Creator. When I stop the debugging, and relaunch the debugging, the previously stated breakpoints are still there, but they are no longer valid. (meaning Qt Creator skips over them). I've verified that new breakpoints are still valid - it's the old ones that become invalid even though they are still listed.
I did not even update any code, just added breakpoints, hit debug and the old breakpoints became invalid even though they are still showing.
No sacarsm intended, but is this a "feature"? If so, how do I turn it off?
If not a feature, what can I try?
It's very painful to re-add breakpoints every time I run a debug.
Using Mac OSX 10.9 here, Qt 5.2, with Qt Creator 3.0 for Mac.
Thanks.
EDIT : Some more info. I realised that whenever the breakpoint works, it has a tiny hour glass next to it, like in the picture. What does the hour glass mean? It could just be something dumb that I'm not doing....
in the end I filed a bug with Qt Creator. For those interested pls check here.
https://bugreports.qt-project.org/browse/QTCREATORBUG-11184
I am about to break something... or pull my hair out...
I just installed:
Eclipse SDK Ver 3.7.2 (Indigo)
CDT
MinGW
I have those two so that I can start to develop C++ on my machine, which is using Windows-XP 32-bit.
Anyway, I got a simple hello-world up and running, and all is peachy... BUT, the problem I have noticed is that everytime I make a new C++ project, it starts it off under Debug mode. I do not know how or why this is, I have gone through just about every option I can see on the menus.
I also do not know how to quickly switch between the modes, and maybe this is hurting me as well, since I am new to Eclipse.
What I want is simple:
Start Eclipse.
Make a new C++ project.
Hit build.
Hit run. (The play button)
Have it run as a release.
"Do something(?)" to switch to debug mode.
Put a breakpoint somewhere.
Hit build.
Hit debug button (the cockroach)
Have me stop over lines of code.
This will cause my hair to remain on my head.
Just for context, my end goal here is Eclipse-As-IDE -> MinGW-as-Cplusplus_compliler -> OpenCV
Thanks in advance!
I'd say the reason for starting in debug mode is that every bigger project will take time, testing and "debugging" to get to a stage where it is ready to be "released". Therefore it defaults to debug.
You can however quickly change to release mode by right-clicking on the project:
Build Configurations->Set Active->Release
For most small projects it doesn't matter what you set. When you get to bigger projects, linking to different libraries depending on whether you are debugging or building for a release, you'll be taking the time to set different parameters in eclipse for different configurations.
I am using Qt Creator to develop a C++ application, and I am trying to track down some memory leaks.
I have followed these instructions*, and have Valgrind isntalled on my Ubuntu machine.
I begin my application from the Analyze Memory section, and after clicking the stop button I am told that Tool Analyze Memory finished, 928 issues found. However, no results appear in the analysis section, which remains blank.
Am I doing something wrong? Where can I find the results of the memory analysis?
*Confusingly, the instructions ask for a 'release' build configuration, but selecting this causes a warning in Qt saying that the memory analysis tool requires a debug configuration. I have tried both ways round.
I've checked it in my Qt Creator and it works. I'm using version 2.3.1 with Qt 4.7.4 and Valgrind 3.7.0. I've tested it on dropsite example with Debug build configuration. I've also tested it with my CMake based project (compiled with -g and -O0 flags) and it also worked. Make sure, that next to start button Valgrind Memory Analyzer is chosen. On the same bar you'll find arrow icons. Next to them is icon of funnel (I think). Click it and make sure that types of errors you're interested in are checked.
If it won't work, and you don't want to use Valgrind tools from console, there are other Valgrind GUIs like Valkyrie.
EDIT: I've updated Qt Creator to version 2.4.0rc1 and checked it with my CMake project. It also showed no results, while reporting few hundred issues. Solution to this was checking External errors after clicking funnel icon.
EDIT2: In final 2.4.0 issue was fixed.
You did nothing wrong. In the Valgrind menu, press the Filter icon and select External Errors. You will see all issues appearing. Those are most likely not from your application, but Qt- or else-related, so you can often ignore them.
X issues found refers to the total number of issues; when External Errors is unselected, only those related to your app show up. If none appears, Valgrind has not detected any memory leak in your app.