MSYS/Mingw下的QTCreator - “无法创建调试引擎。”
我无法在QTCreator中调试我的C ++项目。
我正在运行msys2/mingw版本:
mingw64_nt-10.0.0-19044版本3.3.4-341.x86_64(runneradmin@fv-az448-481)(gcc版本11.2.0(gcc))
我正在运行QTCreator版本:
QT Creator 7.0.0基于QT 6.2.4
我正在使用套件“桌面QT QT Mingw -w64 64bit(MSYS2)”。
当我尝试使用“开始调试启动项目”时,我会收到错误:
无法创建调试引擎。
我确实已安装了GDB, - Version Reports GNU GDB(GDB)11.1
。
如您所见,所有套件都警告说,没有为他们设置调试器。但是,我选择的套件说它正在使用调试器“ mingw -w64 gdb(64bit)”。我无法更改它,因为管理选项被弄清楚。
如何在QTCreator中修复调试?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我需要做几件事:
1:安装较新的GDB(MingW-W64-X86_64-GDB)(12.1)。
2:在套件/调试器下,创建一个新的调试器选项,指向C:\ msys64 \ mingw64 \ bin \ gdb.exe。这可能不需要,因为它与自动检测的相同,但无论如何我都这样做了。
3:创建一个新套件,该套件主要是桌面QT Mingw -w64 64bit(MSYS2)的副本,并将其指向新的调试器。 (无法修改自动生成的套件,只有手动创建套件)
4:确保在调试时进行调试以达到“启动项目的开始调试”选项,而不是“运行”选项。与其他一些编辑器不同,如果正常运行并且不使用调试选项,则具有断点集的调试构建仍会跳过它们。
之后,它完美无缺。
注意:在某个时候,它显然也更新为qtcreator 8.0.1。
There were a couple things I needed to do:
1: Install a newer GDB (mingw-w64-x86_64-gdb) (12.1).
2: Under Kits/Debuggers, create a new debugger option pointing to C:\msys64\mingw64\bin\gdb.exe. This may be not needed as it's identical to an auto-detected one, but I did so anyways.
3: Create a new kit which is mostly a copy of Desktop Qt MinGW -w64 64bit (MSYS2), and point it at the new debugger. (Can't modify automatically generated kits, only manually created kits)
4: Ensure when debugging to hit the "Start debugging of the startup project" option rather than the "Run" option. Unlike some other editors, a Debug build with breakpoints set will still skip past them if run normally and not using the Debug option.
After that, it works flawlessly.
Note: At some point, it apparently updated to QTCreator 8.0.1 as well.