Commit 1d5fadb1 authored by hjk's avatar hjk
Browse files

debugger: switch to an existing engine if a new one fails to start

Task-number: QTCREATORBUG-2912
parent 7c35a577
......@@ -3240,9 +3240,15 @@ void DebuggerPluginPrivate::runControlStarted(DebuggerRunControl *runControl)
void DebuggerPluginPrivate::runControlFinished(DebuggerRunControl *runControl)
{
m_snapshotHandler->removeSnapshot(runControl);
if (m_snapshotHandler->size() == 0) {
// Last engine quits.
disconnectEngine();
if (boolSetting(SwitchModeOnExit) && m_snapshotHandler->size() == 0)
if (boolSetting(SwitchModeOnExit))
activatePreviousMode();
} else {
// Connect to some existing engine.
m_snapshotHandler->activateSnapshot(0);
}
}
void DebuggerPluginPrivate::remoteCommand(const QStringList &options,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment