ILaunchConfiguration configuration,
String mode,
ILaunch launch,
IProgressMonitor monitor) throws CoreException
{
RemotePort debugPort = createDebugPort(launch);
try
{
CGIProxy cgiProxy = new CGIProxy(launch, "CGI Process");
int brazilPort = RemotePort.findFreePort();
IProcess process = startBrazil(
launch, cgiProxy, brazilPort, debugPort);
cgiProxy.waitForConnect();
if (!cgiProxy.isConnected())
{
PerlDebugPlugin.getDefault().logError(
"(CGI-Target) Could not connect to CGI-Proxy");
launch.terminate();
return;
}
launch.addProcess(cgiProxy);
openBrowser(launch, brazilPort);
if (debugPort != null)
createCGIDebugTarget(launch, process, debugPort);
}
catch (CoreException e)
{
if (debugPort != null) debugPort.shutdown();
launch.terminate();
throw e;
}
}