Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp	(revision 41753)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp	(revision 41754)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -169,9 +169,12 @@
     RTGETOPTSTATE               GetState;
     RTGETOPTUNION               ValueUnion;
+
+    /** @todo Put short options into enum / defines! */
     static const RTGETOPTDEF    s_aOptions[] =
     {
-        { "--release",      'r', RTGETOPT_REQ_NOTHING },
+        { "--debug",        'd', RTGETOPT_REQ_NOTHING },
+        { "--release",      'r', RTGETOPT_REQ_NOTHING }
     };
-    int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 2, 0 /*fFlags*/);
+    int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 2, RTGETOPTINIT_FLAGS_OPTS_FIRST);
     AssertRCReturn(rc, RTEXITCODE_FAILURE);
 
@@ -188,5 +191,8 @@
                 break;
 
-            case VINF_GETOPT_NOT_OPTION:
+            /* Because log strings can start with "-" (like "-all+dev_foo")
+             * we have to take everything we got as a setting and apply it.
+             * IPRT will take care of the validation afterwards. */
+            default:
                 if (strSettings.length() == 0)
                     strSettings = ValueUnion.psz;
@@ -197,7 +203,4 @@
                 }
                 break;
-
-            default:
-                return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion);
         }
     }
