aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-09-04 14:29:01 +0200
committerEike Ziller <eike.ziller@qt.io>2018-09-04 13:18:14 +0000
commitc30b629b524597f6ae9d4308301244642fc98e5c (patch)
tree9bd29995bb1e7c27b12a03737d35eea522d8ed5c
parent41764e0d7141f5a00c478341c78828e9a24209f7 (diff)
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>
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index c7934e6839..0e0cc5b916 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -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);