diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index 3c25b60498a70029d705ec3e0d9500b5bb335c5d..f29b8cb1be7e33029db698b34336460318b81266 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -116,6 +116,9 @@ public:
     bool isQmlActive() const;
     void setSimpleDockWidgetArrangement();
     void updateUi();
+    // Debuggable languages are registered with this function.
+    void addLanguage(const DebuggerLanguage &language, const Core::Context &context);
+
 
 public slots:
     void resetDebuggerLayout();
@@ -237,9 +240,8 @@ DebuggerMainWindow::DebuggerMainWindow()
 {
     d = new DebuggerMainWindowPrivate(this);
     d->createViewsMenuItems();
-
-    addLanguage(CppLanguage, Context(C_CPPDEBUGGER));
-    addLanguage(QmlLanguage, Context(C_QMLDEBUGGER));
+    d->addLanguage(CppLanguage, Context(C_CPPDEBUGGER));
+    d->addLanguage(QmlLanguage, Context(C_QMLDEBUGGER));
 }
 
 DebuggerMainWindow::~DebuggerMainWindow()
@@ -329,14 +331,14 @@ void DebuggerMainWindowPrivate::createViewsMenuItems()
     m_viewsMenu->addAction(cmd);
 }
 
-void DebuggerMainWindow::addLanguage(const DebuggerLanguage &languageId,
+void DebuggerMainWindowPrivate::addLanguage(const DebuggerLanguage &languageId,
     const Context &context)
 {
-    d->m_supportedLanguages = d->m_supportedLanguages | languageId;
-    d->m_languageCount++;
+    m_supportedLanguages = m_supportedLanguages | languageId;
+    m_languageCount++;
 
-    d->m_toolBars.insert(languageId, 0);
-    d->m_contextsForLanguage.insert(languageId, context);
+    m_toolBars.insert(languageId, 0);
+    m_contextsForLanguage.insert(languageId, context);
 }
 
 void DebuggerMainWindowPrivate::updateUi()
diff --git a/src/plugins/debugger/debuggermainwindow.h b/src/plugins/debugger/debuggermainwindow.h
index 4a7eaca3e657199afbeb32e9a83792e82ec7e448..95452cf116cfcd787db6973142ee5e608ba16ad9 100644
--- a/src/plugins/debugger/debuggermainwindow.h
+++ b/src/plugins/debugger/debuggermainwindow.h
@@ -61,9 +61,6 @@ public:
     DebuggerMainWindow();
     ~DebuggerMainWindow();
 
-    // Debuggable languages are registered with this function.
-    void addLanguage(const DebuggerLanguage &language, const Core::Context &context);
-
     // Debugger toolbars are registered  with this function.
     void setToolbar(const DebuggerLanguage &language, QWidget *widget);
 
@@ -73,7 +70,6 @@ public:
     // Called when all dependent plugins have loaded.
     void initialize();
 
-
     void onModeChanged(Core::IMode *mode);
     QDockWidget *dockWidget(const QString &objectName) const;
     bool isDockVisible(const QString &objectName) const;
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 5d58630c32b72268576436e9108eeb8201b29abd..30ba9149efb8c5cabebc44121b0b257ef079128d 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -422,31 +422,6 @@ AbstractGdbAdapter *DebuggerRunControlPrivate::gdbAdapter() const
 //
 ////////////////////////////////////////////////////////////////////////
 
-DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration,
-        unsigned enabledEngines, const DebuggerStartParameters &sp)
-    : RunControl(runConfiguration, Constants::DEBUGMODE),
-      d(new DebuggerRunControlPrivate(this, runConfiguration, enabledEngines))
-{
-    connect(this, SIGNAL(finished()), SLOT(handleFinished()));
-    createEngine(sp);
-}
-
-DebuggerRunControl::~DebuggerRunControl()
-{
-    disconnect();
-    if (DebuggerEngine *engine = d->m_engine) {
-        d->m_engine = 0;
-        engine->disconnect();
-        delete engine;
-    }
-}
-
-const DebuggerStartParameters &DebuggerRunControl::startParameters() const
-{
-    QTC_ASSERT(d->m_engine, return *(new DebuggerStartParameters()));
-    return d->m_engine->startParameters();
-}
-
 static DebuggerEngineType engineForToolChain(int toolChainType)
 {
     switch (toolChainType) {
@@ -481,13 +456,17 @@ static DebuggerEngineType engineForToolChain(int toolChainType)
     return NoEngineType;
 }
 
-void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams)
+DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration,
+        unsigned enabledEngines, const DebuggerStartParameters &startParams)
+    : RunControl(runConfiguration, Constants::DEBUGMODE),
+      d(new DebuggerRunControlPrivate(this, runConfiguration, enabledEngines))
 {
-    DebuggerStartParameters sp = startParams;
+    connect(this, SIGNAL(finished()), SLOT(handleFinished()));
 
     // Figure out engine according to toolchain, executable, attach or default.
     DebuggerEngineType engineType = NoEngineType;
     DebuggerLanguages activeLangs = debuggerCore()->activeLanguages();
+    DebuggerStartParameters sp = startParams;
     const unsigned enabledEngineTypes = d->enabledEngines();
     if (sp.executable.endsWith(_(".js")))
         engineType = ScriptEngineType;
@@ -581,6 +560,22 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams
     }
 }
 
+DebuggerRunControl::~DebuggerRunControl()
+{
+    disconnect();
+    if (DebuggerEngine *engine = d->m_engine) {
+        d->m_engine = 0;
+        engine->disconnect();
+        delete engine;
+    }
+}
+
+const DebuggerStartParameters &DebuggerRunControl::startParameters() const
+{
+    QTC_ASSERT(d->m_engine, return *(new DebuggerStartParameters()));
+    return d->m_engine->startParameters();
+}
+
 QString DebuggerRunControl::displayName() const
 {
     QTC_ASSERT(d->m_engine, return QString());
@@ -808,16 +803,6 @@ void DebuggerRunControl::handleRemoteSetupFailed(const QString &message)
     QTC_ASSERT(false, /**/);
 }
 
-void DebuggerRunControl::emitAddToOutputWindow(const QString &line, bool onStdErr)
-{
-    emit addToOutputWindow(this, line, onStdErr);
-}
-
-void DebuggerRunControl::emitAppendMessage(const QString &m, bool isError)
-{
-    emit appendMessage(this, m, isError);
-}
-
 RunConfiguration *DebuggerRunControl::runConfiguration() const
 {
     return d->m_myRunConfiguration.data();
diff --git a/src/plugins/debugger/debuggerrunner.h b/src/plugins/debugger/debuggerrunner.h
index 86c5efa0dde37b0e0ad7552334a4e6621ac63c90..2da5dd3c996eca830fff38b8046e6b9e89d811c7 100644
--- a/src/plugins/debugger/debuggerrunner.h
+++ b/src/plugins/debugger/debuggerrunner.h
@@ -83,18 +83,17 @@ class DEBUGGER_EXPORT DebuggerRunControl
 
 public:
     typedef ProjectExplorer::RunConfiguration RunConfiguration;
-    explicit DebuggerRunControl(RunConfiguration *runConfiguration,
+    DebuggerRunControl(RunConfiguration *runConfiguration,
         unsigned enabledEngines, const DebuggerStartParameters &sp);
     ~DebuggerRunControl();
 
     // ProjectExplorer::RunControl
-    virtual void start();
-    virtual bool aboutToStop() const;
-    virtual StopResult stop();
-    virtual bool isRunning() const;
+    void start();
+    bool aboutToStop() const;
+    StopResult stop(); // Called from SnapshotWindow.
+    bool isRunning() const;
     QString displayName() const;
 
-    void createEngine(const DebuggerStartParameters &startParameters);
     void setCustomEnvironment(Utils::Environment env);
     void startFailed();
     void debuggingFinished();
@@ -117,10 +116,6 @@ public:
 signals:
     void engineRequestSetup();
 
-public slots:
-    void emitAddToOutputWindow(const QString &line, bool onStdErr);
-    void emitAppendMessage(const QString &, bool isError);
-
 private slots:
     void handleFinished();
 
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index f89338381d66df50564f1058571ba2e876ab323e..5d3d12cd02b65011d4c0a709f5fa2207d82ca81c 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -203,11 +203,11 @@ void QmlEngine::setupInferior()
         emit remoteStartupRequested();
     } else {
         connect(&d->m_applicationLauncher, SIGNAL(processExited(int)),
-                this, SLOT(disconnected()));
+                SLOT(disconnected()));
         connect(&d->m_applicationLauncher, SIGNAL(appendMessage(QString,bool)),
-                runControl(), SLOT(emitAppendMessage(QString,bool)));
-        connect(&d->m_applicationLauncher, SIGNAL(appendOutput(QString, bool)),
-                runControl(), SLOT(emitAddToOutputWindow(QString, bool)));
+                SLOT(appendMessage(QString,bool)));
+        connect(&d->m_applicationLauncher, SIGNAL(appendOutput(QString,bool)),
+                SLOT(appendOutput(QString,bool)));
         connect(&d->m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)),
                 runControl(), SLOT(bringApplicationToForeground(qint64)));
 
@@ -218,6 +218,16 @@ void QmlEngine::setupInferior()
     }
 }
 
+void QmlEngine::appendMessage(const QString &msg, bool)
+{
+    showMessage(msg, AppStuff);
+}
+
+void QmlEngine::appendOutput(const QString &msg, bool)
+{
+    showMessage(msg, AppOutput);
+}
+
 void QmlEngine::connectionEstablished()
 {
     attemptBreakpointSynchronization();
diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h
index ff5ee43abb1047b5440977aaf896b8bc9a1a34a7..4e60d62929a6ea25b2e3afff9bee328841635a0b 100644
--- a/src/plugins/debugger/qml/qmlengine.h
+++ b/src/plugins/debugger/qml/qmlengine.h
@@ -121,6 +121,8 @@ private slots:
     void connectionStartupFailed();
     void connectionError(QAbstractSocket::SocketError error);
     void serviceConnectionError(const QString &service);
+    void appendMessage(const QString &msg, bool);
+    void appendOutput(const QString &msg, bool);
 
 private:
     void expandObject(const QByteArray &iname, quint64 objectId);
diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp
index 597996a22c82ca28f963e22e7ffe4cca745130ca..6ce17054afc06dcab7b989f2631c563fda3dc8a2 100644
--- a/src/plugins/qmljsinspector/qmljsinspector.cpp
+++ b/src/plugins/qmljsinspector/qmljsinspector.cpp
@@ -554,7 +554,7 @@ void InspectorUi::setupDockWidgets()
 
     QWidget *observerWidget = new QWidget;
     observerWidget->setWindowTitle(tr("QML Observer"));
-    observerWidget->setObjectName(QLatin1String("QMLObserver"));
+    observerWidget->setObjectName(Debugger::Constants::DOCKWIDGET_QML_INSPECTOR);
 
     QVBoxLayout *wlay = new QVBoxLayout(observerWidget);
     wlay->setMargin(0);
@@ -565,9 +565,7 @@ void InspectorUi::setupDockWidgets()
     wlay->addWidget(m_crumblePath);
 
     Debugger::DebuggerMainWindow *mw = Debugger::DebuggerPlugin::mainWindow();
-    QDockWidget *dock = mw->createDockWidget(Debugger::QmlLanguage,
-        observerWidget, Debugger::Constants::DOCKWIDGET_QML_INSPECTOR,
-        Qt::BottomDockWidgetArea);
+    QDockWidget *dock = mw->createDockWidget(Debugger::QmlLanguage, observerWidget);
     dock->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
     dock->setTitleBarWidget(new QWidget(dock));
 }