import java.util.Map;
import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+import net.sourceforge.phpeclipse.xdebug.core.IProxyEventListener;
import net.sourceforge.phpeclipse.xdebug.core.IXDebugPreferenceConstants;
import net.sourceforge.phpeclipse.xdebug.core.XDebugCorePlugin;
+import net.sourceforge.phpeclipse.xdebug.core.XDebugProxy;
import net.sourceforge.phpeclipse.xdebug.php.model.XDebugTarget;
import org.eclipse.core.resources.IFile;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugTarget;
+//import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-public class PHPLaunchConfigurationDelegate extends LaunchConfigurationDelegate implements ILaunchConfigurationDelegate{
+public class PHPLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
/**
* @see ILaunchConfigurationDelegate#launch(ILaunchConfiguration, String, ILaunch, IProgressMonitor)
abort(MessageFormat.format("PHP-Script {0} does not exist.", new String[] {file.getFullPath().toString()}), null);
}
- commandList.add(file.getFullPath().toOSString());
+ commandList.add(file.getLocation().toOSString());
// Get the Debugport from the preferences
int debugPort=XDebugCorePlugin.getDefault().getPreferenceStore().getInt(IXDebugPreferenceConstants.DEBUGPORT_PREFERENCE);
String[] commandLine = (String[]) commandList.toArray(new String[commandList.size()]);
- XDebugTarget target=null;
+ XDebugProxy proxy = XDebugCorePlugin.getDefault().getXDebugProxy();
+ proxy.start();
+
+ XDebugTarget target = null;
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
target = new XDebugTarget(launch, null, idekey);
+ proxy.addProxyEventListener((IProxyEventListener) target, idekey);
}
+
Process process = DebugPlugin.exec(commandLine, null,envp);
IProcess p = DebugPlugin.newProcess(launch, process, phpInterpreter);