QTCreator under MSYS/Mingw - "Unable to create a debugging engine."
-
I cannot debug my C++ project in QTCreator.
I am running MSYS2/Mingw version:
MINGW64_NT-10.0-19044 version 3.3.4-341.x86_64 (runneradmin@fv-az448-481) (gcc version 11.2.0 (GCC) )
I am running QTCreator version:
Qt Creator 7.0.0 based on Qt 6.2.4
I am using the kit "Desktop Qt MinGW -w64 64bit (MSYS2)".
When I try to use "Start debugging of the startup project" I get the error:
Unable to create a debugging engine.
Here is a picture of my kits dialogue.
I do have GDB installed, --version reports
GNU gdb (GDB) 11.1
.As you can see, all the kits warn that no debugger is set up for them. However, the kit I've selected says that it is using the debugger "MinGW -w64 GDB (64bit)". I cannot change it, as the Manage option is greyed out.
How do I fix the debugging in QTCreator?
-
Make sure that your kit has the path to your MSYS2 directory. You can changed it in the "Environment" section.
I can see that you have system CMake, which starting with version 3.21 should support the MSYS2 environment https://cmake.org/cmake/help/latest/release/3.21.html
MSYS2 is not a configuration that is officially supported, you should use the MinGW installation from Qt SDK.
-
@cristian-adam What do I check for in Environment to ensure the kit has a path to my MSYS2 directory?
Why did you mention Cmake?
I'm confused about the MinGW comment. I launched QTCreator through an MSYS2 MingGW shell, and the kit says MinGW. Are you saying MSYS2's MinGW is only one implementation of MinGW, and there are others?
Where is this "MinGW installation from Qt SDK" and what does installing it entail?
-
Hi,
You can install it using the Maintenance Tool. You'll have then the exact version of MinGW that was used to build Qt.
-
You installed everything through msys ?
-
Then I would check with the msys folks.
That said, as @cristian-adam wrote, the only officially supported version of MinGW is provided through the Qt online installer. You should check with that one.
-
@SGaist And that installer offers a mingw installation version? It will auto-detect that I already have mingw installed I am assuming? Will it over-write my existing qtcreator install in mingw, or will it be under a separate name? Or do I just need to uninstall the relevant packages from mingw using pacman first?
-
Yes it will, just select it.
Your msys installation will be left untouched.