1) Fixed breakpoint with skip count (or hit count).
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.core / src / net / sourceforge / phpeclipse / xdebug / core / xdebug / XDebugConnection.java
index 8fa7006..c5d0dcc 100644 (file)
@@ -150,15 +150,25 @@ public class XDebugConnection {
        }
 
        public /*XDebugResponse*/ int  breakpointSetOld(String file, int lineNumber) {
-               String arg = "-t line -f file://"+PHPDebugUtils.escapeString(file)+" -n " + lineNumber;
+               String arg = "-t line -f file://" + PHPDebugUtils.escapeString (file) + " -n " + lineNumber;
                return sendRequest("breakpoint_set", arg);              
        }
        
-       public /*XDebugResponse*/ int  breakpointSet(String file, int lineNumber, int hitCount) {
-               String arg = "-t line -f file://"+PHPDebugUtils.escapeString(file)+" -n " + lineNumber;
-               if (hitCount > 0) {
-                       arg += " -h " + hitCount;       
-               }
+       public /*XDebugResponse*/ int  breakpointSet(String file, int lineNumber, int hitCount, boolean bConditional, String condition) {
+           String arg;
+           
+           if (bConditional) {
+               arg  = "-t conditional -f file://" + PHPDebugUtils.escapeString (file) + " -n " + lineNumber;
+            arg += " -- " + Base64.encodeBytes (condition.getBytes ());
+           }
+           else {
+               arg = "-t line -f file://" + PHPDebugUtils.escapeString (file) + " -n " + lineNumber;
+               
+                   if (hitCount > 0) {
+                       arg += " -h " + hitCount;       
+                   }
+           }
+           
                return sendRequest("breakpoint_set", arg);              
        }
        
@@ -169,7 +179,7 @@ public class XDebugConnection {
        }
        
        public /*XDebugResponse*/ int  breakpointRemove(int id) {
-               return sendRequest("breakpoint_set", "-d " + id);
+               return sendRequest("breakpoint_remove", "-d " + id);
        }
 
        public /*XDebugResponse*/ int  stackGet(/*int Level*/) {