diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp
index ff5612bc3e7b20c36b3ae5774793195f6dcc2d14..9a6add0ca28e76feecaeb593b2fc0212ffd478c5 100644
--- a/src/plugins/android/androiddebugsupport.cpp
+++ b/src/plugins/android/androiddebugsupport.cpp
@@ -89,6 +89,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
     params.startMode = AttachToRemoteServer;
     params.displayName = AndroidManager::packageName(target);
     params.remoteSetupNeeded = true;
+    params.runConfiguration = runConfig;
 
     DebuggerRunConfigurationAspect *aspect
             = runConfig->extraAspect<DebuggerRunConfigurationAspect>();
@@ -119,7 +120,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
     }
 
     DebuggerRunControl * const debuggerRunControl
-        = DebuggerRunControlFactory::doCreate(params, runConfig, errorMessage);
+        = DebuggerRunControlFactory::doCreate(params, errorMessage);
     new AndroidDebugSupport(runConfig, debuggerRunControl);
     return debuggerRunControl;
 }
diff --git a/src/plugins/baremetal/baremetalruncontrolfactory.cpp b/src/plugins/baremetal/baremetalruncontrolfactory.cpp
index a6cd670e39c8a80e4dbf5efe9ae792ef3253e515..92aba1554093f12cf29015c73816dba31c99e72d 100644
--- a/src/plugins/baremetal/baremetalruncontrolfactory.cpp
+++ b/src/plugins/baremetal/baremetalruncontrolfactory.cpp
@@ -156,8 +156,8 @@ RunControl *BareMetalRunControlFactory::create(
     if (p->startupMode() == GdbServerProvider::StartupOnNetwork)
         sp.remoteSetupNeeded = true;
 
-    DebuggerRunControl *runControl =
-            DebuggerRunControlFactory::doCreate(sp, rc, errorMessage);
+    sp.runConfiguration = rc;
+    DebuggerRunControl *runControl = DebuggerRunControlFactory::doCreate(sp, errorMessage);
     if (runControl && sp.remoteSetupNeeded) {
         const auto debugSupport = new BareMetalDebugSupport(dev, runControl);
         Q_UNUSED(debugSupport);
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index a7e667d636b487079123a2a0e9d66e6ba8fea60a..d2e068ad430f7449d16deef16ed4ac3db9cd329f 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -378,11 +378,12 @@ RunControl *DebuggerRunControlFactory::create
     if (mode == DebugRunModeWithBreakOnMain)
         sp.breakOnMain = true;
 
-    return doCreate(sp, runConfiguration, errorMessage);
+    sp.runConfiguration = runConfiguration;
+    return doCreate(sp, errorMessage);
 }
 
 DebuggerRunControl *DebuggerRunControlFactory::doCreate
-    (const DebuggerStartParameters &sp0, RunConfiguration *rc, QString *errorMessage)
+    (const DebuggerStartParameters &sp0, QString *errorMessage)
 {
     TaskHub::clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
     TaskHub::clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME);
@@ -406,7 +407,7 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate
     if (sp.executable.endsWith(_(".py"))) {
         sp.masterEngineType = PdbEngineType;
     } else {
-        if (rc) {
+        if (RunConfiguration *rc = sp.runConfiguration) {
             DebuggerRunConfigurationAspect *aspect
                     = rc->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
             if (const Target *target = rc->target())
@@ -438,7 +439,7 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate
             *errorMessage = error;
         return 0;
     }
-    return new DebuggerRunControl(rc, engine);
+    return new DebuggerRunControl(sp.runConfiguration, engine);
 }
 
 IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc)
@@ -449,7 +450,7 @@ IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect
 DebuggerRunControl *DebuggerRunControlFactory::createAndScheduleRun(const DebuggerStartParameters &sp)
 {
     QString errorMessage;
-    DebuggerRunControl *rc = doCreate(sp, 0, &errorMessage);
+    DebuggerRunControl *rc = doCreate(sp, &errorMessage);
     if (!rc) {
         ProjectExplorerPlugin::showRunErrorMessage(errorMessage);
         return 0;
diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h
index 47978fd9766db310010f9e2e733ba41e9ddb31c4..44959d6fbb38d477ca5d7af23bc5593e3e84c45f 100644
--- a/src/plugins/debugger/debuggerruncontrol.h
+++ b/src/plugins/debugger/debuggerruncontrol.h
@@ -118,8 +118,7 @@ public:
 
     static DebuggerRunControl *createAndScheduleRun(const DebuggerStartParameters &sp);
 
-    static DebuggerRunControl *doCreate(const DebuggerStartParameters &sp,
-        ProjectExplorer::RunConfiguration *rc, QString *errorMessage);
+    static DebuggerRunControl *doCreate(const DebuggerStartParameters &sp, QString *errorMessage);
 
     ProjectExplorer::IRunConfigurationAspect *createRunConfigurationAspect(
             ProjectExplorer::RunConfiguration *rc);
diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h
index 3e6d6cfd82c9ff2366b858412bcfd498c02d6592..b07baa868d0453fa6967756fe3666aadfea53916 100644
--- a/src/plugins/debugger/debuggerstartparameters.h
+++ b/src/plugins/debugger/debuggerstartparameters.h
@@ -39,6 +39,7 @@
 #include <utils/environment.h>
 #include <projectexplorer/abi.h>
 #include <projectexplorer/kit.h>
+#include <projectexplorer/runconfiguration.h>
 #include <projectexplorer/devicesupport/idevice.h>
 
 #include <QMetaType>
@@ -82,6 +83,7 @@ public:
         firstSlaveEngineType(NoEngineType),
         secondSlaveEngineType(NoEngineType),
         cppEngineType(NoEngineType),
+        runConfiguration(0),
         isSnapshot(false),
         attachPID(-1),
         useTerminal(false),
@@ -112,6 +114,7 @@ public:
     QString debuggerCommand;
     ProjectExplorer::Abi toolChainAbi;
     ProjectExplorer::IDevice::ConstPtr device;
+    QPointer<ProjectExplorer::RunConfiguration> runConfiguration;
 
     QString platform;
     QString executable;
diff --git a/src/plugins/ios/iosdebugsupport.cpp b/src/plugins/ios/iosdebugsupport.cpp
index a74b0cb150f4f3b63ef2fa088142bab691fdd13f..fd8a1df08ececac1323f51af7841bb61e32a535d 100644
--- a/src/plugins/ios/iosdebugsupport.cpp
+++ b/src/plugins/ios/iosdebugsupport.cpp
@@ -118,6 +118,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
     params.remoteSetupNeeded = true;
     if (!params.breakOnMain)
         params.continueAfterAttach = true;
+    params.runConfiguration = runConfig;
 
     DebuggerRunConfigurationAspect *aspect
             = runConfig->extraAspect<DebuggerRunConfigurationAspect>();
@@ -170,7 +171,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
     }
 
     DebuggerRunControl * const debuggerRunControl
-        = DebuggerRunControlFactory::doCreate(params, runConfig, errorMessage);
+        = DebuggerRunControlFactory::doCreate(params, errorMessage);
     if (debuggerRunControl)
         new IosDebugSupport(runConfig, debuggerRunControl, cppDebug, qmlDebug);
     return debuggerRunControl;
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp
index 7bb6f5bb04d654625776ef3795473b3a8f80003e..9eb8910669eb9b3d5b2c92a39e99a80a0dcd0d78 100644
--- a/src/plugins/qnx/blackberryruncontrolfactory.cpp
+++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp
@@ -114,6 +114,53 @@ static void createAnalyzerStartParameters(Analyzer::AnalyzerStartParameters *pSt
         pStartParameters->analyzerPort = aspect->qmlDebugServerPort();
 }
 
+static Debugger::DebuggerStartParameters startParameters(BlackBerryRunConfiguration *runConfig)
+{
+    Debugger::DebuggerStartParameters params;
+    ProjectExplorer::Target *target = runConfig->target();
+    ProjectExplorer::Kit *k = target->kit();
+
+    params.startMode = Debugger::AttachToRemoteServer;
+    params.debuggerCommand = Debugger::DebuggerKitInformation::debuggerCommand(k).toString();
+    params.sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toString();
+    params.useCtrlCStub = true;
+    params.runConfiguration = runConfig;
+
+    if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k))
+        params.toolChainAbi = tc->targetAbi();
+
+    params.executable = runConfig->localExecutableFilePath();
+    params.displayName = runConfig->displayName();
+    params.remoteSetupNeeded = true;
+
+    Debugger::DebuggerRunConfigurationAspect *aspect
+            = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
+    if (aspect->useQmlDebugger()) {
+        BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
+        if (device) {
+            params.qmlServerAddress = device->sshParameters().host;
+            params.qmlServerPort = aspect->qmlDebugServerPort();
+            params.languages |= Debugger::QmlLanguage;
+        }
+    }
+    if (aspect->useCppDebugger())
+        params.languages |= Debugger::CppLanguage;
+
+    if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
+        params.projectSourceDirectory = project->projectDirectory().toString();
+        if (const ProjectExplorer::BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
+            params.projectBuildDirectory = buildConfig->buildDirectory().toString();
+        params.projectSourceFiles = project->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
+    }
+
+    BlackBerryQtVersion *qtVersion =
+            dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
+    if (qtVersion)
+        params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
+
+    return params;
+}
+
 ProjectExplorer::RunControl *BlackBerryRunControlFactory::create(ProjectExplorer::RunConfiguration *runConfiguration,
         ProjectExplorer::RunMode mode, QString *errorMessage)
 {
@@ -161,7 +208,7 @@ ProjectExplorer::RunControl *BlackBerryRunControlFactory::create(ProjectExplorer
         return runControl;
     }
     Debugger::DebuggerRunControl * const runControl =
-            Debugger::DebuggerRunControlFactory::doCreate(startParameters(rc), runConfiguration, errorMessage);
+            Debugger::DebuggerRunControlFactory::doCreate(startParameters(rc), errorMessage);
     if (!runControl)
         return 0;
 
@@ -169,50 +216,3 @@ ProjectExplorer::RunControl *BlackBerryRunControlFactory::create(ProjectExplorer
     m_activeRunControls[rc->key()] = runControl;
     return runControl;
 }
-
-Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
-        const BlackBerryRunConfiguration *runConfig)
-{
-    Debugger::DebuggerStartParameters params;
-    ProjectExplorer::Target *target = runConfig->target();
-    ProjectExplorer::Kit *k = target->kit();
-
-    params.startMode = Debugger::AttachToRemoteServer;
-    params.debuggerCommand = Debugger::DebuggerKitInformation::debuggerCommand(k).toString();
-    params.sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toString();
-    params.useCtrlCStub = true;
-
-    if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k))
-        params.toolChainAbi = tc->targetAbi();
-
-    params.executable = runConfig->localExecutableFilePath();
-    params.displayName = runConfig->displayName();
-    params.remoteSetupNeeded = true;
-
-    Debugger::DebuggerRunConfigurationAspect *aspect
-            = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
-    if (aspect->useQmlDebugger()) {
-        BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
-        if (device) {
-            params.qmlServerAddress = device->sshParameters().host;
-            params.qmlServerPort = aspect->qmlDebugServerPort();
-            params.languages |= Debugger::QmlLanguage;
-        }
-    }
-    if (aspect->useCppDebugger())
-        params.languages |= Debugger::CppLanguage;
-
-    if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
-        params.projectSourceDirectory = project->projectDirectory().toString();
-        if (const ProjectExplorer::BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
-            params.projectBuildDirectory = buildConfig->buildDirectory().toString();
-        params.projectSourceFiles = project->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
-    }
-
-    BlackBerryQtVersion *qtVersion =
-            dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
-    if (qtVersion)
-        params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
-
-    return params;
-}
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.h b/src/plugins/qnx/blackberryruncontrolfactory.h
index 9aa99515deaceeac2413dbc2d611110e77317f90..b36a485ecee607332e46361a7ee5b38b2d076ff2 100644
--- a/src/plugins/qnx/blackberryruncontrolfactory.h
+++ b/src/plugins/qnx/blackberryruncontrolfactory.h
@@ -58,8 +58,6 @@ public:
                                         QString *errorMessage);
 
 private:
-    static Debugger::DebuggerStartParameters startParameters( const BlackBerryRunConfiguration *runConfig);
-
     mutable QMap<QString, QPointer<ProjectExplorer::RunControl> > m_activeRunControls;
 };
 
diff --git a/src/plugins/qnx/qnxattachdebugsupport.cpp b/src/plugins/qnx/qnxattachdebugsupport.cpp
index 7ad528272b70ac703bb15e167df8dabd42ca238c..281a10b6158d67a2f7799e730d4ca20d24f1d34b 100644
--- a/src/plugins/qnx/qnxattachdebugsupport.cpp
+++ b/src/plugins/qnx/qnxattachdebugsupport.cpp
@@ -132,7 +132,7 @@ void QnxAttachDebugSupport::attachToProcess()
         sp.solibSearchPath = QnxUtils::searchPaths(qtVersion);
 
     QString errorMessage;
-    Debugger::DebuggerRunControl * const runControl = Debugger::DebuggerRunControlFactory::doCreate(sp, 0, &errorMessage);
+    Debugger::DebuggerRunControl * const runControl = Debugger::DebuggerRunControlFactory::doCreate(sp, &errorMessage);
     if (!errorMessage.isEmpty()) {
         handleError(errorMessage);
         stopPDebug();
diff --git a/src/plugins/qnx/qnxruncontrolfactory.cpp b/src/plugins/qnx/qnxruncontrolfactory.cpp
index e21cfcf3fd0bcaccccae331d676d0b2ae02d8ed5..21e093c103da55fd1677452130247050f7299430 100644
--- a/src/plugins/qnx/qnxruncontrolfactory.cpp
+++ b/src/plugins/qnx/qnxruncontrolfactory.cpp
@@ -62,7 +62,7 @@ using namespace ProjectExplorer;
 using namespace Qnx;
 using namespace Qnx::Internal;
 
-static DebuggerStartParameters createDebuggerStartParameters(const QnxRunConfiguration *runConfig)
+static DebuggerStartParameters createDebuggerStartParameters(QnxRunConfiguration *runConfig)
 {
     DebuggerStartParameters params;
     Target *target = runConfig->target();
@@ -76,6 +76,7 @@ static DebuggerStartParameters createDebuggerStartParameters(const QnxRunConfigu
     params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
     params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
     params.useCtrlCStub = true;
+    params.runConfiguration = runConfig;
 
     if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
         params.toolChainAbi = tc->targetAbi();
@@ -179,7 +180,7 @@ RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, RunMode mo
         return new QnxRunControl(rc);
     case DebugRunMode: {
         const DebuggerStartParameters params = createDebuggerStartParameters(rc);
-        DebuggerRunControl * const runControl = DebuggerRunControlFactory::doCreate(params, rc, errorMessage);
+        DebuggerRunControl * const runControl = DebuggerRunControlFactory::doCreate(params, errorMessage);
         if (!runControl)
             return 0;
 
diff --git a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
index c1074a5b8995c828d6d876d097c16a452258890e..32130ccc938311acce98b9ad1aef13e92dd7af24 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
@@ -106,8 +106,9 @@ RunControl *RemoteLinuxRunControlFactory::create(RunConfiguration *runConfig, Ru
         DebuggerStartParameters params = LinuxDeviceDebugSupport::startParameters(rc);
         if (mode == DebugRunModeWithBreakOnMain)
             params.breakOnMain = true;
+        params.runConfiguration = rc;
         DebuggerRunControl * const runControl
-                = DebuggerRunControlFactory::doCreate(params, rc, errorMessage);
+                = DebuggerRunControlFactory::doCreate(params, errorMessage);
         if (!runControl)
             return 0;
         LinuxDeviceDebugSupport * const debugSupport =
diff --git a/src/plugins/valgrind/memcheckengine.cpp b/src/plugins/valgrind/memcheckengine.cpp
index d52e6ef6e9a74dd1041a6c8db9091da41c6bd8d7..67f17f031599d7969e515878d93b7fe8605909a0 100644
--- a/src/plugins/valgrind/memcheckengine.cpp
+++ b/src/plugins/valgrind/memcheckengine.cpp
@@ -189,9 +189,10 @@ void MemcheckWithGdbRunControl::startDebugger()
     sp.remoteChannel = QString::fromLatin1("| vgdb --pid=%1").arg(valgrindPid);
     sp.useContinueInsteadOfRun = true;
     sp.expectedSignals << "SIGTRAP";
+    sp.runConfiguration = rc;
 
     QString errorMessage;
-    RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, rc, &errorMessage);
+    RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, &errorMessage);
     QTC_ASSERT(gdbRunControl, return);
     connect(gdbRunControl, &RunControl::finished,
             gdbRunControl, &RunControl::deleteLater);
diff --git a/src/plugins/winrt/winrtdebugsupport.cpp b/src/plugins/winrt/winrtdebugsupport.cpp
index 3a8abbc15b8d89292dc3d5f0f51db35e66a5276b..2961af61b02c229f936051603c0a2f6f669316b9 100644
--- a/src/plugins/winrt/winrtdebugsupport.cpp
+++ b/src/plugins/winrt/winrtdebugsupport.cpp
@@ -119,8 +119,9 @@ RunControl *WinRtDebugSupport::createDebugRunControl(WinRtRunConfiguration *runC
                     return 0;
                 }
                 server.close();
+                params.runConfiguration = runConfig;
                 Debugger::DebuggerRunControl *debugRunControl
-                        = DebuggerRunControlFactory::doCreate(params, runConfig, errorMessage);
+                        = DebuggerRunControlFactory::doCreate(params, errorMessage);
                 runner->setRunControl(debugRunControl);
                 new WinRtDebugSupport(debugRunControl, runner);
                 return debugRunControl;