Debugger: Do not waste CPU when using LLDB

Fixes: QTCREATORBUG-23311
Change-Id: I5b1c40663c7977322e806af2e0393a3730e70049
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2020-01-13 11:02:27 +01:00
parent 499115fd94
commit fefdbdfcd8
2 changed files with 10 additions and 5 deletions

View File

@@ -203,7 +203,9 @@ void LldbEngine::setupEngine()
const FilePath lldbCmd = runParameters().debugger.executable;
showMessage("STARTING LLDB: " + lldbCmd.toUserOutput());
m_lldbProc.setEnvironment(runParameters().debugger.environment);
Environment environment = runParameters().debugger.environment;
environment.appendOrSet("PYTHONUNBUFFERED", "1"); // avoid flushing problem on macOS
m_lldbProc.setEnvironment(environment);
if (QFileInfo(runParameters().debugger.workingDirectory).isDir())
m_lldbProc.setWorkingDirectory(runParameters().debugger.workingDirectory);