private IProcess process;
private boolean isTerminated;
+ private boolean isSuspended;
private ILaunch launch;
private PHPThread[] threads;
private PHPDBGProxy phpDBGProxy;
public PHPDebugTarget(ILaunch launch, IProcess process) {
+ this.isSuspended = false;
this.launch = launch;
this.process = process;
this.threads = new PHPThread[0];
}
public String getModelIdentifier() {
- return PHPDebugCorePlugin.getUniqueIdentifier();
+ return PHPDebugCorePlugin.PLUGIN_ID;
}
public IDebugTarget getDebugTarget() {
}
public boolean canResume() {
- return false;
+ if(isTerminated) return false;
+ return isSuspended;
}
public boolean canSuspend() {
- return false;
+ if(isTerminated) return false;
+ return !isSuspended;
}
public boolean isSuspended() {
- return false;
+ return isSuspended;
}
public void resume() throws DebugException {
+ this.getPHPDBGProxy().resume();
+ isSuspended= false;
}
public void suspend() throws DebugException {
+ this.getPHPDBGProxy().pause();
+ isSuspended= true;
}
public void breakpointAdded(IBreakpoint breakpoint) {
getPHPDBGProxy().stop();
}
}
+ } else if (event.getKind() == DebugEvent.SUSPEND) {
+ getPHPDBGProxy().pause();
}
}
}