Show errors in console
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / src / net / sourceforge / phpdt / internal / debug / core / PHPDBGProxy.java
index aecbdf0..feb5325 100644 (file)
@@ -52,6 +52,11 @@ public class PHPDBGProxy {
        public void stop() {
                phpLoop.setShouldStop();
                if(DBGInt != null) DBGInt.setShouldStop();
+               try {
+                       getDebugTarget().getProcess().terminate();
+               } catch (DebugException e) {
+                       e.printStackTrace();
+               }
                phpLoop.notifyWait();
        }
 
@@ -89,7 +94,7 @@ public class PHPDBGProxy {
        }
 
        public BufferedReader getReader() throws IOException {
-               if (reader == null) {                   
+               if (reader == null) {
                        reader = new BufferedReader(new InputStreamReader(this.getSocket().getInputStream(), "ISO8859_1"));
                }
                return reader;
@@ -147,7 +152,7 @@ public class PHPDBGProxy {
                phpLoop.start();
        }
 
-       public void resume(PHPThread thread) {
+       public void resume() {
                try {
                        DBGInt.continueExecution();
                        phpLoop.notifyWait();
@@ -157,6 +162,14 @@ public class PHPDBGProxy {
                }
        }
 
+       public void pause() {
+               try {
+                       DBGInt.pauseExecution();
+               } catch (IOException e) {
+                       PHPDebugCorePlugin.log(e);
+                       stop();
+               }
+       }
        protected IPHPDebugTarget getDebugTarget() {
                return debugTarget;
        }
@@ -337,5 +350,5 @@ public class PHPDBGProxy {
                                //System.out.println("Socket loop finished.");
                        }
                }
-       }       
+       }
 }