Qt Debugger在Mac上使用错误的python版本



我在macOS Mojave 10.14.6上。我的Qt版本是5.13.1。我的Qt Creator版本是4.10.0。

当我设置断点并运行应用程序时,调试器永远不会完成并打印到调试器日志中,并显示以下错误。

因此,从我所能收集到的信息来看,使用了用于lldb的错误版本的python。这是Qt Creator设置还是Mac设置,我该如何修复?

d调用:设置引擎 dSTART LLDB:/usr/bin/lldb 设置劣质... <1loadDumpers({"token":1}( <2executeDebuggerCommand({"command":"settings append target.source-map/Users/qt/work/qt/usr/local/Cellar/qt/5.13.1/../src","token":2}( <3setupInferior({"attachpid":0,"breakonmain":0,,"executable":"/

Users/kyle/GoogleDrive/programming/MasteringQt5/Chapter02/build-Sysinfo-Desktop-Debug/Sysinfo.app/Content/MacOS/Sysinfo","nativemixed":0,"platform":","processargs":","remotechannel":","startmode":1,"sysroot":","token":3,"useterminal":0,"workingdirectory":"/Users/kyle/GoogleDrive/programming/MasteringQt5/Chapter02/build-Sysinfo-Desktop-Debug/Sysinfo.app/Content/MacOS"}((lldb( script sys.path.insert(1, '/Applications/Qt Creator.app/Contents/Resources/debugger/'(

(LLDB( 脚本来自 LLDBBbridge 导入 * 回溯(最近一次调用(: 文件 ",第 1 行,在 文件"/应用程序/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py",第 1912 行 打印消息 ^

语法错误:调用"打印"时缺少括号。你是说打印(消息(吗?

作为快速修复,请在终端中运行以下命令:

defaults write com.apple.dt.lldb DefaultPythonVersion 2

问题是lldb的默认版本现在是Python 3。这导致了Qt的一些问题,希望这些问题很快就会得到解决:

https://bugreports.qt.io/browse/QTCREATORBUG-22955

此问题在 QTCREATORBUG-22955 中得到解决,并在 Qt Creator 4.10.1 中修复。

最新更新