diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index b7a86df3f7c..b159e052c0a 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -181,12 +181,16 @@ void AbstractRemoteLinuxDebugSupport::startExecution() void AbstractRemoteLinuxDebugSupport::handleRemoteProcessFinished(qint64 exitCode) { - if (!m_engine || m_state == Inactive || exitCode == 0) + if (!m_engine || m_state == Inactive) return; if (m_state == Debugging) { - if (m_debuggingType != RemoteLinuxRunConfiguration::DebugQmlOnly) + // The QML engine does not realize on its own that the application has finished. + if (m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly) + m_engine->quitDebugger(); + else if (exitCode != 0) m_engine->notifyInferiorIll(); + } else { const QString errorMsg = m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly ? tr("Remote application failed with exit code %1.").arg(exitCode)