OSDN Git Service

Use env var com.android.ddms.bindir for ddms.
authorRaphael Moll <ralf@android.com>
Sat, 13 Nov 2010 18:59:21 +0000 (10:59 -0800)
committerRaphael Moll <ralf@android.com>
Mon, 15 Nov 2010 18:30:53 +0000 (10:30 -0800)
The env var is used if the system property is not defined,
which is convenient to start ddms in debug mode from Eclipse.

Change-Id: I2a33c12399c703cf3194e2e67f39562ab0d59bd9

ddms/app/src/com/android/ddms/Main.java

index 0c55078..c8bab66 100644 (file)
@@ -84,6 +84,12 @@ public class Main {
         // get the ddms parent folder location
         String ddmsParentLocation = System.getProperty("com.android.ddms.bindir"); //$NON-NLS-1$
 
+        if (ddmsParentLocation == null) {
+            // Tip: for debugging DDMS in eclipse, set this env var to the SDK/tools
+            // directory path.
+            ddmsParentLocation = System.getenv("com.android.ddms.bindir"); //$NON-NLS-1$
+        }
+
         // we're past the point where ddms can be called just to send a ping, so we can
         // ping for ddms itself.
         ping(ddmsParentLocation);