forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user