I've selected GDB instead of CDB as the debugger in Qt Creator on Windows:
But when I start debugging a program, it fails with this error:
Unable to create a debugger engine of the type "No engine"
It works if I select CDB from the Combo. Why am I getting this error, and how do I fix it? I assume I do have GDB installed if it's in the combo box, right?
Edit: I see where the problem might lie, but still no idea how do I fix it:
[Open the above image in a new tab to see in full resolution.] It says "Not recognized" for GDB.
Edit 2: I just remembered that I'm using the MSVC compiler, and the Qt libs are compiled for MSVC:
Maybe that's the reason? Although GDB should be able to debug any executable, not just ones generated by gcc, so I'm not sure if it's relevant.
You can't use GDB with MSVC-compiled code. It seems you're mixing the two.
CDB goes with Visual C++. GDB goes with MinGW(-w64).
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 running Eclipse on win7. I want to make console applications that can run on either windows or linux. I followed the guide here on how to setup the compiler
I'm trying to compile and run a simple hello world program. It compiles fine, but when I try to debug I get the following error:
'launching test' has encountered a problem.
Error in final launch sequence.
Clicking details reveals the following information.
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run. Try "help target".
Don't know how to run. Try "help target".
My gdb debugger path is C:\codesourcery\bin\arm-none-eabi-gdb.exe
I'm not exactly sure how to proceed.
If you're creating a windows console then I would think you would need gdb found in c:\minGW or wherever you have your Windows 7 gcc toolchain.
To change your debugger on Eclipse Kepler go to:
Run->Debug Configurations. Select Debugger tab and in the "GDB debugger:" field, enter the path of your Windows gdb.exe file (c:\MinGW\bin\gdb.exe if you're using minGW)
I realize this is an old question, but hoping it will help someone. In my case, there was a breakpoint set with only a memory address (no file name associated with it). Not sure how I got into this situation... Once I removed the breakpoint, I was able to launch my program with debugger. Note, I am using Eclipse Luna CDT (SR2)
Issue
I am having difficulty debugging inside of my application's timerEvent functions. While the application is able to run, if I set a breakpoint inside of even something as simple as the following, I receive an error message stating: "The gdb process crashed."
void MyClass::timerEvent (QTimerEvent *e) {
std::cout << "TIMER!";
}
I have included a debugger log here via pastebin.
Attempts
To try and fix this, I tried upgrading gdb iteratively with each version of QT-creator to no avail.
I am using:
Linux ubuntu-x86 2.6.32-42-generic #95-Ubuntu 10.04LTS SMP i686 GNU/Linux
QT creator (versions 2.4 through 2.5.2)
gdb (7.1 through 7.5) targeting "x86-linux-generic-elf-32bit"
pythongdb (7.2)
Questions
My questions are twofold, namely:
What is causing gdb to crash?
and
What can I do to make it work?
Failing that, I wonder: Where else should I look for more details of the crash?
Any and all help is greatly appreciated.
Make sure your QT libraries are up to date. Even though a new QT-creator will install via the handy-dandy .bin file they provide, it was built using the newer QT libraries, and expects them to be in place. If they are not, well...
Additionally, if you are not installing gdb into one of the standard directories where QT-creator can find it, make sure you add it manually to your toolchains via tools->options->build and run->toolchains.
I've got a problem with gdb debugger. My console app shows me incorrect action results (some trash instead of normal string which I've got from XML ater the parsing) if I run it under a debugger plus I get SIGINT ( I don't output eol character and don't hit ctrl+c). Running my app with no attached debugger (just double click on .exe or Run menu from IDE) shows me correct results. What is the problem?
Some Info:
Windows 7 Pro Sp1 x86
gdb 7.3.1 (MinGW) and gcc 4.6.2 (MinGW)
Eclipse 3.7.1
Here is a gdb trace.
At this screenshot you can see the settings
Probably you have some memory corruption in your application and and they become visible when you use the debugger. In order to solve the problem we need to take a look on your source code.