无法创建 "No engine" 类型的调试器引擎

Unable to create a debugger engine of the type "No engine"

我刚刚安装了 Qt Creator(Windows 64 位),我正在检查是否一切正常。

此时我遇到的唯一问题与调试器有关。首先我尝试手动添加 gdb (gdb.exe) 并弹出一些关于 python 的问题,所以我添加了 gdb-python (gdb-python27.exe) 结果是:

Unable to create a debugger engine of the type "No engine"

我使用这个套件:

MinGW -> MinGW\bin\mingw32-gcc-4.8.1.exe
GBD-Python -> MinGW\bin\gdb-python27.exe

我阅读了 ,但由于我使用的是 MinGW,所以对我没有帮助:/

提前谢谢你。

Edit1: 如果你想推荐我另一个套件配置我是开放的:-)

Edit2:我试图执行 gdb-python27.exe 但出现错误(缺少 python27.dll)。我将它安装在 C:\Windows\SysWOW64 中,现在错误(当我尝试打开 gdb-python27.exe 时)类似于 The application failed to initialize properly (0xc000007b)。在Qt creator中调试还是一样的错误

Edit3:问题与我的 MinGW(32 位)和我的 OS(64 位)之间的差异有关吗?不要这么认为(Qt creator 是 32 位的)。我认为消息 The application failed to initialize properly (0xc000007b) 是因为我使用 python27.dll(64 位)而不是 32 位。

Edit4:我下载了 python27.dll(32 位),现在我可以执行 gdb-python27.exe 但我是通过 cmd.exe 收到这条消息的: ImportError: No module named site.

我在尝试使用 Qt creator 进行调试时仍然遇到错误 Unable to create a debugger engine of the type "No engine"

Unable to create a debugger engine of the type "No engine"

这里是a bug in Q1t Creator 3.3.0,更新的话应该就OK了。或者,它似乎可以通过更新到 Python 2.7.1.

来解决

The application failed to initialize properly (0xc000007b)

如果 Qt 是 32 位的,那么 Python.dll


ImportError: No module named site

这似乎是一个 Python 配置问题,如下所述:Python (Windows) - ImportError: No module named site

Setting the PYTHONPATH / PYTHONHOME variables

Right click the Computer icon in the start menu, go to properties. On the left tab, go to Advanced system settings. In the window that comes up, go to the Advanced tab, then at the bottom click Environment Variables. Click in the list of user variables and start typing Python, and repeat for System variables, just to make certain that you don't have mis-set variables for PYTHONPATH or PYTHONHOME. Next, add new variables (I did in System rather than User, although it may work for User too): PYTHONPATH, set to C:\Python27\Lib. PYTHONHOME, set to C:\Python27.

或者,安装 Python 2.7.1 似乎也能解决这个问题。

我在安装带有 QtCreator 4.2.1 的 Qt 5.8.0 时遇到了类似的问题。

我的机器上没有安装 Visual Studio 2015,我不想为其安装 Visual Studio 2015。所以我从微软网站安装了 visualcppbuildtools_full,它安装了所有必需的编译器。 QtCreator 检测到 MSVC 编译器。

QtCreator 仍然抱怨调试器。为此,我下载了 Windows SDK 10 独立版,仅选择了调试工具。并安装了调试工具,这也解决了调试器问题。

交叉检查,

  • 验证 C:\Program Files (x86)\Windows Kits\Debuggers\x64\cdb.exe 和 C:\Program Files (x86)\Windows Kits\Debuggers\x86\cdb.exe与所有其他二进制文件一起创建。
  • 现在,打开 QtCreator。转到工具 |选项 |构建 & 运行 |调试器选项卡。
  • 验证以上 cdb.exe 文件路径列在“自动检测”部分下。

此后开始调试。