diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index a1b4c743fc8b860bcf0e24913e74c00f320b544b..6b27f0a54075620183b1b31e9451717e170b5b0c 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -2766,6 +2766,11 @@ bool DebuggerPlugin::isRegisterViewVisible() const
     return d->m_registerDock->toggleViewAction()->isChecked();
 }
 
+bool DebuggerPlugin::hasSnapsnots() const
+{
+    return d->m_snapshotHandler->size();
+}
+
 static inline bool canShutDown(DebuggerState s)
 {
     switch (s) {
diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h
index 80bb7396a94122160d630b7826b42b2ddd0c5c58..4a226ed4b050c8db646e443adb53c498948b7a73 100644
--- a/src/plugins/debugger/debuggerplugin.h
+++ b/src/plugins/debugger/debuggerplugin.h
@@ -87,6 +87,7 @@ public:
 
     const CPlusPlus::Snapshot &cppCodeModelSnapshot() const;
     bool isRegisterViewVisible() const;
+    bool hasSnapsnots() const;
 
     void openTextEditor(const QString &titlePattern, const QString &contents);
 
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 341fbbd8c53a2da5456d9d4f9de55dc9097bd14b..9238fdb34a4009788f8ba5df279cf3dfa6de1535 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -151,7 +151,8 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
     sp.dumperLibrary = rc->dumperLibrary();
     sp.dumperLibraryLocations = rc->dumperLibraryLocations();
 
-    if (DebuggerRunControl::isQmlProject(runConfiguration)) {
+    DebuggerLanguages activeLangs = DebuggerUISwitcher::instance()->activeDebugLanguages();
+    if (activeLangs & QmlLanguage) {
         sp.qmlServerAddress = QLatin1String("127.0.0.1");
         sp.qmlServerPort = rc->environment().value("QML_DEBUG_SERVER_PORT").toUInt();
         if (sp.qmlServerPort == 0)
@@ -380,7 +381,7 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams
     if (!engineType)
         engineType = engineForMode(sp.startMode);
 
-    if (engineType != QmlEngineType && sp.m_isQmlProject && (activeLangs & QmlLanguage)) {
+    if (engineType != QmlEngineType && (activeLangs & QmlLanguage)) {
         if (activeLangs & CppLanguage) {
             sp.cppEngineType = engineType;
             engineType = QmlCppEngineType;
@@ -497,14 +498,16 @@ void DebuggerRunControl::start()
         return;
     }
 
-    plugin()->activateDebugMode();    
+    DebuggerUISwitcher::instance()->aboutToStartDebugger();
 
     const QString message = tr("Starting debugger '%1' for tool chain '%2'...").
                   arg(m_engine->objectName(), toolChainName(sp.toolChainType));
     plugin()->showMessage(message, StatusBar);
     plugin()->showMessage(DebuggerSettings::instance()->dump(), LogDebug);
-
     plugin()->runControlStarted(this);
+
+    plugin()->activateDebugMode();
+
     engine()->startDebugger(this);
     m_running = true;
     emit started();
diff --git a/src/plugins/debugger/debuggeruiswitcher.cpp b/src/plugins/debugger/debuggeruiswitcher.cpp
index 1af6d1be83d373e8082e261e6b948f6fbf94c4a5..6e5882a93f6da79b68944bef9fbff445f74a42c5 100644
--- a/src/plugins/debugger/debuggeruiswitcher.cpp
+++ b/src/plugins/debugger/debuggeruiswitcher.cpp
@@ -32,6 +32,7 @@
 #include "debuggeractions.h"
 #include "debuggerconstants.h"
 #include "debuggerrunner.h"
+#include "debuggerplugin.h"
 #include "savedaction.h"
 
 #include <utils/savedaction.h>
@@ -305,23 +306,20 @@ void DebuggerUISwitcher::modeChanged(Core::IMode *mode)
     d->m_mainWindow->setDockActionsVisible(d->m_inDebugMode);
     hideInactiveWidgets();
 
-    if (mode->id() != Constants::MODE_DEBUG)
+    if (mode->id() != Constants::MODE_DEBUG || DebuggerPlugin::instance()->hasSnapsnots())
        return;
 
-    Core::EditorManager *editorManager = Core::EditorManager::instance();
-    if (editorManager->currentEditor()) {
-        DebuggerLanguages activeLangs;
-        if (isCurrentProjectCppBased())
-            activeLangs |= CppLanguage;
+    DebuggerLanguages activeLangs;
+    if (isCurrentProjectCppBased())
+        activeLangs |= CppLanguage;
 
-        if (isCurrentProjectQmlCppBased())
-            activeLangs |= QmlLanguage;
+    if (isCurrentProjectQmlCppBased())
+        activeLangs |= QmlLanguage;
 
-        if (d->m_activateCppAction)
-            d->m_activateCppAction->setChecked(activeLangs & CppLanguage);
-        if (d->m_activateQmlAction)
-            d->m_activateQmlAction->setChecked(activeLangs & QmlLanguage);
-    }
+    if (d->m_activateCppAction)
+        d->m_activateCppAction->setChecked(activeLangs & CppLanguage);
+    if (d->m_activateQmlAction)
+        d->m_activateQmlAction->setChecked(activeLangs & QmlLanguage);
 
     updateActiveLanguages();
 }
@@ -634,6 +632,12 @@ QWidget *DebuggerUISwitcher::createContents(Core::BaseMode *mode)
     return splitter;
 }
 
+void DebuggerUISwitcher::aboutToStartDebugger()
+{
+    if (!DebuggerPlugin::instance()->hasSnapsnots())
+        updateActiveLanguages();
+}
+
 void DebuggerUISwitcher::aboutToShutdown()
 {
     writeSettings();
diff --git a/src/plugins/debugger/debuggeruiswitcher.h b/src/plugins/debugger/debuggeruiswitcher.h
index 97ebd9f7120dbc4b5f93c352b31c344198d8ddc6..bb69ab0df7c30cd3f572aa9499790274b0a08145 100644
--- a/src/plugins/debugger/debuggeruiswitcher.h
+++ b/src/plugins/debugger/debuggeruiswitcher.h
@@ -94,6 +94,7 @@ public:
     // called when all dependent plugins have loaded
     void initialize();
 
+    void aboutToStartDebugger();
     void aboutToShutdown();
 
     // most common debugger windows