Some more tracing options were added, Mac-specific issue resolved
authorEugene Ostroukhov <eugeneo@symbian.org>
Tue, 23 Feb 2010 16:06:31 -0800
changeset 188 e5e8e576a692
parent 187 5331bec5c4d6
child 189 ccfbeb9e8e29
Some more tracing options were added, Mac-specific issue resolved
org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/ChromeInstancesManager.java
org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/DebugConnectionJob.java
org.symbian.tools.wrttools.previewer/.options
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/PreviewerPlugin.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/WebAppInterface.java
--- a/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/ChromeInstancesManager.java	Tue Feb 23 13:52:45 2010 -0800
+++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/ChromeInstancesManager.java	Tue Feb 23 16:06:31 2010 -0800
@@ -38,8 +38,8 @@
 
 public class ChromeInstancesManager {
     private static final String[] CHROME_ARGS = { "%s", "--remote-shell-port=%d", // Here we will set port
-            "\"--user-data-dir=%s\"", // Here we will set profile folder so user settings have no effect
-            "\"--disk-cache-dir=%s\"", // We don't care
+            "--user-data-dir=%s", // Here we will set profile folder so user settings have no effect
+            "--disk-cache-dir=%s", // We don't care
             "--disable-web-security", // Widgets can use network now
             "--disable-extenions", // Use standard UI, should also improve speed and stability
             "--disable-plugins", // Run faster!
--- a/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/DebugConnectionJob.java	Tue Feb 23 13:52:45 2010 -0800
+++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/DebugConnectionJob.java	Tue Feb 23 16:06:31 2010 -0800
@@ -71,6 +71,9 @@
 	}
 
 	public boolean browserRunning(URI uri) throws CoreException {
+		if (Activator.DEBUG_CONNECTION) {
+			System.out.println("Browser running, connecting @" + hashCode());
+		}
 		DestructingGuard destructingGuard = new DestructingGuard();
 		try {
 			JavascriptVmEmbedder.ConnectionToRemote remoteServer = createConnectionToRemote(
@@ -83,12 +86,18 @@
 					}
 				}
 			};
+			if (Activator.DEBUG_CONNECTION) {
+				System.out.println("Setting up 1@" + hashCode());
+			}
 			destructingGuard.addValue(lauchDestructor);
 
 			WorkspaceBridge.Factory bridgeFactory = new WRTProjectWorkspaceBridge.Factory(
 					project);
 			final DebugTargetImpl target = new DebugTargetImpl(launch,
 					bridgeFactory);
+			if (Activator.DEBUG_CONNECTION) {
+				System.out.println("Setting up 2@" + hashCode());
+			}
 
 			Destructable targetDestructor = new Destructable() {
 				public void destruct() {
@@ -97,8 +106,14 @@
 			};
 			destructingGuard.addValue(targetDestructor);
 
+			if (Activator.DEBUG_CONNECTION) {
+				System.out.println("Setting up 3@" + hashCode());
+			}
 			boolean attached = target.attach(remoteServer, destructingGuard,
 					null, new NullProgressMonitor());
+			if (Activator.DEBUG_CONNECTION) {
+				System.out.printf("Is attached: %b, @%d\n", attached, hashCode());
+			}
 			if (!attached) {
 				// Error
 				return false;
--- a/org.symbian.tools.wrttools.previewer/.options	Tue Feb 23 13:52:45 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/.options	Tue Feb 23 16:06:31 2010 -0800
@@ -1,3 +1,4 @@
 org.symbian.tools.wrttools.previewer/debug=false
 org.symbian.tools.wrttools.previewer/servlet=false
 org.symbian.tools.wrttools.previewer/mapping=false
+org.symbian.tools.wrttools.previewer/webapp=false
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/PreviewerPlugin.java	Tue Feb 23 13:52:45 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/PreviewerPlugin.java	Tue Feb 23 16:06:31 2010 -0800
@@ -46,6 +46,9 @@
 	public static final boolean TRACE_MAPPING = DEBUG
 			&& Boolean.parseBoolean(Platform.getDebugOption(PLUGIN_ID
 					+ "/mapping"));
+	public static final boolean TRACE_WEBAPP = DEBUG
+			&& Boolean.parseBoolean(Platform.getDebugOption(PLUGIN_ID
+					+ "/webapp"));
 	
 	// The shared instance
 	private static PreviewerPlugin plugin;
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/WebAppInterface.java	Tue Feb 23 13:52:45 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/WebAppInterface.java	Tue Feb 23 16:06:31 2010 -0800
@@ -33,6 +33,9 @@
 	private static WebAppInterface INSTANCE;
 
 	public static void connectDebugger(String widget, String id) {
+		if (PreviewerPlugin.TRACE_WEBAPP) {
+			System.out.println("Connecting debugger");
+		}
 		getInstance().connect(widget, id);
 	}
 
@@ -53,6 +56,9 @@
 	}
 
 	public static String getAjaxUri(String widget, String id) {
+		if (PreviewerPlugin.TRACE_WEBAPP) {
+			System.out.println("getAjaxUri");
+		}
 		return getInstance().createAjaxUri(widget, id).toASCIIString();
 	}
 
@@ -68,10 +74,16 @@
 	}
 
 	public static boolean isConnected(String widget, String id) {
+		if (PreviewerPlugin.TRACE_WEBAPP) {
+			System.out.println("isConnected");
+		}
 		return getInstance().isJobComplete(widget, id);
 	}
 
 	public static boolean isSuccessful(String widget, String id) {
+		if (PreviewerPlugin.TRACE_WEBAPP) {
+			System.out.println("isSuccessful");
+		}
 		return getInstance().isConnectionSuccessful(widget, id);
 	}