throws CoreException {
if (!mode.equals(ILaunchManager.DEBUG_MODE)) {
throw new IllegalArgumentException("Only debug mode supported");
}
int port = configuration.getAttribute("teavm-debugger-port", 2357);
final ChromeRDPServer server = new ChromeRDPServer();
server.setPort(port);
ChromeRDPDebugger jsDebugger = new ChromeRDPDebugger();
server.setExchangeConsumer(jsDebugger);
Debugger debugger = new Debugger(jsDebugger, new URLDebugInformationProvider(""));
new Thread() {
@Override public void run() {
server.start();
}
}.start();
TeaVMDebugTarget target = new TeaVMDebugTarget(launch, debugger, jsDebugger, server);
launch.addDebugTarget(target);
launch.addProcess(target.getProcess());