Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h	(revision 12435)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h	(revision 12436)
@@ -191,4 +191,5 @@
     void processGlobalSettingChange (const char *publicName, const char *name);
 
+    void dbgPrepareDebugMenu();
     void dbgShowStatistics();
     void dbgShowCommandLine();
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp	(revision 12435)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp	(revision 12436)
@@ -568,13 +568,12 @@
 
 #ifdef VBOX_WITH_DEBUGGER_GUI
+    if (mDbgMenu)
+        connect (mDbgMenu, SIGNAL (aboutToShow()), this, SLOT (dbgPrepareDebugMenu()));
     if (dbgStatisticsAction)
-        connect (dbgStatisticsAction, SIGNAL (triggered()),
-                 this, SLOT (dbgShowStatistics()));
+        connect (dbgStatisticsAction, SIGNAL (triggered()), this, SLOT (dbgShowStatistics()));
     if (dbgCommandLineAction)
-        connect (dbgCommandLineAction, SIGNAL (triggered()),
-                 this, SLOT (dbgShowCommandLine()));
+        connect (dbgCommandLineAction, SIGNAL (triggered()), this, SLOT (dbgShowCommandLine()));
     if (dbgLoggingAction)
-        connect (dbgLoggingAction, SIGNAL (toggled (bool)),
-                 this, SLOT (dbgLoggingToggled (bool)));
+        connect (dbgLoggingAction, SIGNAL (toggled (bool)), this, SLOT (dbgLoggingToggled (bool)));
 #endif
 
@@ -3404,4 +3403,30 @@
 
 /**
+ * Prepare the Debug menu.
+ */
+void VBoxConsoleWnd::dbgPrepareDebugMenu()
+{
+#ifdef VBOX_WITH_DEBUGGER_GUI
+    /* The "Logging" item. */
+    bool fEnabled = false;
+    bool fChecked = false;
+    CConsole cconsole = csession.GetConsole();
+    if (cconsole.isOk())
+    {
+        CMachineDebugger cdebugger = cconsole.GetDebugger();
+        if (cconsole.isOk())
+        {
+            fEnabled = true;
+            fChecked = cdebugger.GetLogEnabled() != FALSE;
+        }
+    }
+    if (fEnabled != dbgLoggingAction->isEnabled())
+        dbgLoggingAction->setEnabled (fEnabled);
+    if (fChecked != dbgLoggingAction->isChecked())
+        dbgLoggingAction->setChecked (fChecked);
+#endif /* VBOX_WITH_DEBUGGER_GUI */
+}
+
+/**
  * Called when the Debug->Statistics... menu item is selected.
  */
