/* * Copyright (C) 2012 Martin Leopold * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. */ package processing.mode.experimental; import com.sun.jdi.VirtualMachine; import processing.app.RunnerListener; import processing.app.SketchException; import processing.app.exec.StreamRedirectThread; import processing.mode.java.JavaBuild; import processing.mode.java.runner.MessageSiphon; /** * Runs a {@link JavaBuild}. Launches the build in a new debuggee VM. * * @author Martin Leopold */ public class DebugRunner extends processing.mode.java.runner.Runner { // important inherited fields // protected VirtualMachine vm; public DebugRunner(JavaBuild build, RunnerListener listener) throws SketchException { super(build, listener); } /** * Launch the virtual machine. Simple non-blocking launch. VM starts * suspended. * * @return debuggee VM or null on failure */ public VirtualMachine launch() { // String[] machineParamList = getMachineParams(); // String[] sketchParamList = getSketchParams(false); // /* // * System.out.println("vm launch sketch params:"); for (int i=0; // * i