Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h	(revision 8812)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h	(revision 8813)
@@ -185,6 +185,8 @@
     void processGlobalSettingChange (const char *publicName, const char *name);
 
+    void dbgPrepareDebugMenu();
     void dbgShowStatistics();
     void dbgShowCommandLine();
+    void dbgLoggingToggled (bool);
 
     void onEnterFullscreen();
@@ -233,4 +235,5 @@
     QAction *dbgStatisticsAction;
     QAction *dbgCommandLineAction;
+    QAction *dbgLoggingAction;
 #endif
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 8812)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 8813)
@@ -112,4 +112,5 @@
     , dbgStatisticsAction (NULL)
     , dbgCommandLineAction (NULL)
+    , dbgLoggingAction (NULL)
     , dbgMenu (NULL)
 #endif
@@ -260,8 +261,12 @@
 
 #ifdef VBOX_WITH_DEBUGGER_GUI
+    /* Debug menu actions */
     if (vboxGlobal().isDebuggerEnabled())
     {
         dbgStatisticsAction = new QAction (this, "dbgStatisticsAction");
         dbgCommandLineAction = new QAction (this, "dbgCommandLineAction");
+        dbgLoggingAction = new QAction (this, "dbgLoggingAction");
+        dbgLoggingAction->setToggleAction (true);
+        dbgLoggingAction->setIconSet (VBoxGlobal::iconSet ("start_16px.png")); /// @todo find the default check boxes.
     }
     else
@@ -269,4 +274,5 @@
         dbgStatisticsAction = NULL;
         dbgCommandLineAction = NULL;
+        dbgLoggingAction = NULL;
     }
 #endif
@@ -378,4 +384,5 @@
         dbgStatisticsAction->addTo (dbgMenu);
         dbgCommandLineAction->addTo (dbgMenu);
+        dbgLoggingAction->addTo (dbgMenu);
         menuBar()->insertItem (QString::null, dbgMenu, dbgMenuId);
         mMainMenu->insertItem (QString::null, dbgMenu, dbgMenuId);
@@ -582,4 +589,7 @@
 
 #ifdef VBOX_WITH_DEBUGGER_GUI
+    if (dbgMenu)
+        connect (dbgMenu, SIGNAL (aboutToShow()),
+                 this, SLOT (dbgPrepareDebugMenu()));
     if (dbgStatisticsAction)
         connect (dbgStatisticsAction, SIGNAL (activated()),
@@ -588,4 +598,7 @@
         connect (dbgCommandLineAction, SIGNAL (activated()),
                  this, SLOT (dbgShowCommandLine()));
+    if (dbgLoggingAction)
+        connect (dbgLoggingAction, SIGNAL (toggled (bool)),
+                 this, SLOT (dbgLoggingToggled (bool)));
 #endif
 
@@ -1551,4 +1564,6 @@
     if (dbgCommandLineAction)
         dbgCommandLineAction->setMenuText (tr ("&Command line..."));
+    if (dbgLoggingAction)
+        dbgLoggingAction->setMenuText (tr ("&Logging..."));
 #endif
 
@@ -3363,4 +3378,28 @@
 
 /**
+ * Prepare the Debug menu.
+ */
+void VBoxConsoleWnd::dbgPrepareDebugMenu()
+{
+    /* 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->isOn())
+        dbgLoggingAction->setOn (fChecked);
+}
+
+/**
  * Called when the Debug->Statistics... menu item is selected.
  */
@@ -3382,4 +3421,19 @@
         DBGGuiShowCommandLine (dbg_gui);
 #endif
+}
+
+/**
+ * Called when the Debug->Logging menu item is selected.
+ */
+void VBoxConsoleWnd::dbgLoggingToggled (bool aState)
+{
+    CConsole cconsole = csession.GetConsole();
+    if (cconsole.isOk())
+    {
+        CMachineDebugger cdebugger = cconsole.GetDebugger();
+        if (cconsole.isOk())
+            cdebugger.SetLogEnabled(aState);
+    }
+
 }
 
