Fix environment for Start and Debug External Application

In this case we do not have a run configuration with the needed
information, so use the system environment, modified by the kit's
environment changes.

Task-number: QTCREATORBUG-20185
Change-Id: Ie95e6eecf0b81f09f2f2aca3d5e792e5b39d000c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2018-09-04 14:29:01 +02:00
parent 41764e0d71
commit c30b629b52

View File

@@ -436,6 +436,11 @@ void StartApplicationDialog::run(bool attachRemote)
debugger->setServerStartScript(newParameters.serverStartScript); // Note: This requires inferior.
bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
if (isLocal) {
Environment inferiorEnvironment = Environment::systemEnvironment();
k->addToEnvironment(inferiorEnvironment);
debugger->setInferiorEnvironment(inferiorEnvironment);
}
if (!attachRemote)
debugger->setStartMode(isLocal ? StartExternal : StartRemoteProcess);