Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6850)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6851)
@@ -1288,9 +1288,18 @@
     }
 
-    private void updateSystemProperty(String key, String value) {
+    /**
+     * Updates a given system property.
+     * @param key The property key
+     * @param value The property value
+     * @return the previous value of the system property, or {@code null} if it did not have one.
+     * @since 6851
+     */
+    public static String updateSystemProperty(String key, String value) {
         if (value != null) {
             String old = System.setProperty(key, value);
             Main.debug("System property '"+key+"' set to '"+value+"'. Old value was '"+old+"'");
-        }
+            return old;
+        }
+        return null;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6850)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6851)
@@ -40,4 +40,5 @@
 import org.openstreetmap.josm.data.AutosaveTask;
 import org.openstreetmap.josm.data.CustomConfigurator;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.Version;
 import org.openstreetmap.josm.gui.download.DownloadDialog;
@@ -305,5 +306,5 @@
         // http://stackoverflow.com/q/75218/2257172
         // To be replaced with official API when switching to Java 7: https://bugs.openjdk.java.net/browse/JDK-4714232
-        System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());
+        Preferences.updateSystemProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());
 
         // initialize the platform hook, and
@@ -320,5 +321,8 @@
 
         if (args.containsKey(Option.DEBUG)) {
+            // Enable JOSM debug level
             logLevel = 4;
+            // Enable debug in OAuth signpost
+            Preferences.updateSystemProperty("debug", "true");
             Main.debug(tr("Print debugging messages to console"));
         }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 6850)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 6851)
@@ -13,4 +13,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Preferences;
 
 /**
@@ -19,7 +20,7 @@
  */
 public class PlatformHookOsx extends PlatformHookUnixoid implements PlatformHook, InvocationHandler {
-    
+
     private static PlatformHookOsx ivhandler = new PlatformHookOsx();
-    
+
     @Override
     public void preStartupHook() {
@@ -28,7 +29,7 @@
         // And will not work when one of the system independent LAFs is used.
         // They just insist on painting themselves...
-        System.setProperty("apple.laf.useScreenMenuBar", "true");
-    }
-    
+        Preferences.updateSystemProperty("apple.laf.useScreenMenuBar", "true");
+    }
+
     @Override
     public void startupHook() {
@@ -48,5 +49,5 @@
         }
     }
-    
+
     @Override
     public Object invoke (Object proxy, Method method, Object[] args) throws Throwable {
@@ -69,5 +70,5 @@
         return null;
     }
-    
+
     @Override
     public void openUrl(String url) throws IOException {
@@ -212,5 +213,5 @@
         Shortcut.registerSystemShortcut("view:zoomout", tr("reserved"), KeyEvent.VK_SUBTRACT, KeyEvent.META_DOWN_MASK); // Zoom out
     }
-    
+
     @Override
     public String makeTooltip(String name, Shortcut sc) {
