Patch from Anders Betn�- enable changing breakpoints while debugging.
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / src / net / sourceforge / phpdt / internal / debug / core / PHPDBGProxy.java
index 197fa7f..4f665aa 100644 (file)
@@ -21,6 +21,7 @@ import net.sourceforge.phpdt.internal.debug.core.model.IPHPDebugTarget;
 import net.sourceforge.phpdt.internal.debug.core.model.PHPStackFrame;
 import net.sourceforge.phpdt.internal.debug.core.model.PHPThread;
 import net.sourceforge.phpdt.internal.debug.core.model.PHPVariable;
+import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -141,11 +142,14 @@ public class PHPDBGProxy {
   }
 
   protected void setBreakPoints() throws IOException, CoreException {
-    IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints();
-    for (int i = 0; i < breakpoints.length; i++) {
-      addBreakpoint(breakpoints[i]);
-    }
-  }
+               IBreakpoint[] breakpoints = DebugPlugin.getDefault()
+                               .getBreakpointManager().getBreakpoints();
+               for (int i = 0; i < breakpoints.length; i++) {
+                       if (breakpoints[i].isEnabled()) {
+                               addBreakpoint(breakpoints[i]);
+                       }
+               }
+       }
 
   private String MapPath(PHPLineBreakpoint phpLBP) {
                IPath filename;
@@ -167,7 +171,7 @@ public class PHPDBGProxy {
                        }
                }
                if (pathtranslation && remote) {
-                       if (path.substring(0, 1).equals("/"))
+                       if (remoteSourcePath.toString().substring(0, 1).equals("/"))
                                path = path.replace('\\', '/');
                        else
                                path = path.replace('/', '\\');
@@ -231,7 +235,7 @@ public class PHPDBGProxy {
       DBGInt.continueExecution();
       phpLoop.notifyWait();
     } catch (IOException e) {
-      PHPDebugCorePlugin.log(e);
+      PHPeclipsePlugin.log("Debugging session ended.", e);
       stop();
     }
   }