diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index 3f510f31500..1c6dc62e652 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -137,6 +137,7 @@ void PdbEngine::setupEngine() QStringList args = { bridge, scriptFile.fileName() }; args.append(Utils::QtcProcess::splitArgs(runParameters().inferior.workingDirectory)); showMessage(_("STARTING ") + m_interpreter + QLatin1Char(' ') + args.join(QLatin1Char(' '))); + m_proc.setEnvironment(runParameters().debuggerEnvironment.toStringList()); m_proc.start(m_interpreter, args); if (!m_proc.waitForStarted()) { diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index a3f92a9884a..fdeb8e2134e 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -405,6 +405,7 @@ private: QString m_interpreter; QString m_mainScript; QString m_commandLineArguments; + Utils::Environment m_environment; ApplicationLauncher::Mode m_runMode; bool m_running; }; @@ -1077,6 +1078,7 @@ PythonRunControl::PythonRunControl(PythonRunConfiguration *rc, Core::Id mode) m_mainScript = rc->mainScript(); m_runMode = rc->extraAspect()->runMode(); m_commandLineArguments = rc->extraAspect()->arguments(); + m_environment = rc->extraAspect()->environment(); connect(&m_applicationLauncher, &ApplicationLauncher::appendMessage, this, &PythonRunControl::slotAppendMessage); @@ -1108,6 +1110,7 @@ void PythonRunControl::start() QtcProcess::addArgs(&r.commandLineArguments, m_commandLineArguments); r.executable = m_interpreter; r.runMode = m_runMode; + r.environment = m_environment; m_applicationLauncher.start(r); setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));