New Xdebug configuration manual. contributed by Ian MacLennan .
[phpeclipse.git] / net.sourceforge.phpeclipse.launching / src / net / sourceforge / phpdt / internal / launching / PHPLaunchConfigurationDelegate.java
index d4c0680..1a7973f 100644 (file)
@@ -53,11 +53,19 @@ public class PHPLaunchConfigurationDelegate extends LaunchConfigurationDelegate
         */
        public void launch(ILaunchConfiguration configuration, String mode,
                        ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               if (PHPRuntime.getDefault().getSelectedInterpreter() == null) {
-                       String pid = PHPLaunchingPlugin.PLUGIN_ID;
-                       String msg = "You must define an interpreter before running PHP.";
-                       IStatus s = new Status(IStatus.ERROR, pid, IStatus.OK, msg, null);
-                       throw new CoreException(s);
+               //if (PHPRuntime.getDefault().getSelectedInterpreter() == null) {
+               if (configuration.getAttribute(
+                               PHPLaunchConfigurationAttribute.SELECTED_INTERPRETER, "")
+                               .equals("")) {
+                       if (!configuration.getAttribute(
+                                       PHPLaunchConfigurationAttribute.REMOTE_DEBUG, false)
+                                       && mode.equals("debug") || mode.equals("run")) {
+                               String pid = PHPLaunchingPlugin.PLUGIN_ID;
+                               String msg = "You must define an interpreter before running PHP.";
+                               IStatus s = new Status(IStatus.ERROR, pid, IStatus.OK, msg,
+                                               null);
+                               throw new CoreException(s);
+                       }
                }
 
                InterpreterRunnerConfiguration conf = new InterpreterRunnerConfiguration(