diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 9757ddba08cb753c43652983f6603e79e310c011..342967cd50ba9ebe4da4d7d345176def0d2c2044 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -2551,9 +2551,18 @@ ExtensionSystem::IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown()
         d->m_uiSwitcher->aboutToShutdown();
     //if (d->m_engine)
     //    d->m_engine->shutdown();
-    return SynchronousShutdown;
+
+    // FIXME: Notify all engines instead.
+    QTimer::singleShot(0, this, SLOT(emitShutdownFinished()));
+    return AsynchronousShutdown;
 }
 
+void DebuggerPlugin::emitShutdownFinished()
+{
+    emit asynchronousShutdownFinished();
+}
+
+
 void DebuggerPlugin::showMessage(const QString &msg, int channel, int timeout)
 {
     //qDebug() << "PLUGIN OUTPUT: " << channel << msg;
diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h
index c7e97604274e1bf5bcd1fe6d4d20334bb94a9e0d..f1429f509458fb1c35596ed0d3370ce7850c5a05 100644
--- a/src/plugins/debugger/debuggerplugin.h
+++ b/src/plugins/debugger/debuggerplugin.h
@@ -35,7 +35,6 @@
 #include <extensionsystem/iplugin.h>
 
 QT_BEGIN_NAMESPACE
-class QAbstractItemView;
 class QIcon;
 class QMessageBox;
 QT_END_NAMESPACE
@@ -119,8 +118,9 @@ signals:
 
 private:
     friend class Internal::DebuggerEngine;
-    friend class Internal::DebuggerListener
-;
+    friend class Internal::DebuggerListener;
+
+    Q_SLOT void emitShutdownFinished();
     bool initialize(const QStringList &arguments, QString *errorMessage);
     ShutdownFlag aboutToShutdown();
     void extensionsInitialized();