diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 46ccd86dc96f1a083b0c828e522041e01f214abe..9d2c4cb86564b5a754a4dda9cec4eea89f8e31e4 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -210,6 +210,14 @@ void QmlEngine::beginConnection()
 
 void QmlEngine::connectionStartupFailed()
 {
+    if (isSlaveEngine()) {
+        if (masterEngine()->state() != InferiorRunOk) {
+            // we're right now debugging C++, just try longer ...
+            beginConnection();
+            return;
+        }
+    }
+
     Core::ICore * const core = Core::ICore::instance();
     QMessageBox *infoBox = new QMessageBox(core->mainWindow());
     infoBox->setIcon(QMessageBox::Critical);