use of com.intellij.lang.javascript.flex.debug.FlexDebugProcess in project intellij-plugins by JetBrains.
the class FlexBaseRunner method launchDebugProcess.
protected RunContentDescriptor launchDebugProcess(final Module module, final FlexBuildConfiguration bc, final BCBasedRunnerParameters params, final ExecutionEnvironment env) throws ExecutionException {
final XDebugSession debugSession = XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
try {
if (params instanceof FlexUnitRunnerParameters) {
return new FlexDebugProcess(session, bc, params) {
@NotNull
@Override
public ExecutionConsole createConsole() {
try {
return createFlexUnitRunnerConsole(session.getProject(), env, getProcessHandler());
} catch (ExecutionException e) {
Logger.getInstance(FlexBaseRunner.class.getName()).error(e);
}
return super.createConsole();
}
};
}
return new FlexDebugProcess(session, bc, params);
} catch (IOException e) {
iosStopForwardTcpPortIfNeeded(bc, params);
throw new ExecutionException(e.getMessage(), e);
}
}
});
debugSession.addSessionListener(new XDebugSessionListener() {
@Override
public void sessionStopped() {
iosStopForwardTcpPortIfNeeded(bc, params);
}
});
return debugSession.getRunContentDescriptor();
}
Aggregations