| Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java (revision 13660)
|
| +++ editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java (working copy)
|
| @@ -17,6 +17,7 @@
|
| import com.google.dart.tools.core.model.DartSdkManager;
|
| import com.google.dart.tools.debug.core.DartDebugCorePlugin;
|
| import com.google.dart.tools.debug.core.DartLaunchConfigWrapper;
|
| +import com.google.dart.tools.debug.core.server.ServerDebugTarget;
|
| import com.google.dart.tools.debug.core.util.NetUtils;
|
|
|
| import org.eclipse.core.resources.IResource;
|
| @@ -114,11 +115,9 @@
|
| commandsList.add(vmExecPath);
|
| commandsList.addAll(Arrays.asList(launchConfig.getVmArgumentsAsArray()));
|
|
|
| - // BUG(5883) Debugging of standalone programs is disabled
|
| - // because it sometimes leads to program crashes.
|
| -// if (enableDebugging && !DartCore.isWindows()) {
|
| -// commandsList.add("--debug:" + connectionPort);
|
| -// }
|
| + if (enableDebugging && !DartCore.isWindows()) {
|
| + commandsList.add("--debug:" + connectionPort);
|
| + }
|
|
|
| String packageRoot = DartCore.getPlugin().getPackageRootPref();
|
| if (packageRoot != null) {
|
| @@ -177,23 +176,21 @@
|
|
|
| eclipseProcess.setAttribute(IProcess.ATTR_CMDLINE, generateCommandLine(commands));
|
|
|
| - // BUG(5883) Debugging of standalone programs is disabled
|
| - // because it sometimes leads to program crashes.
|
| -// if (enableDebugging && !DartCore.isWindows()) {
|
| -// ServerDebugTarget debugTarget = new ServerDebugTarget(launch, eclipseProcess, connectionPort);
|
| -//
|
| -// try {
|
| -// debugTarget.connect();
|
| -//
|
| -// launch.addDebugTarget(debugTarget);
|
| -// } catch (DebugException ex) {
|
| -// // We don't throw an exception if the process died before we could connect.
|
| -// if (!isProcessDead(runtimeProcess)) {
|
| -// throw ex;
|
| -// }
|
| -// }
|
| -// }
|
| + if (enableDebugging && !DartCore.isWindows()) {
|
| + ServerDebugTarget debugTarget = new ServerDebugTarget(launch, eclipseProcess, connectionPort);
|
|
|
| + try {
|
| + debugTarget.connect();
|
| +
|
| + launch.addDebugTarget(debugTarget);
|
| + } catch (DebugException ex) {
|
| + // We don't throw an exception if the process died before we could connect.
|
| + if (!isProcessDead(runtimeProcess)) {
|
| + throw ex;
|
| + }
|
| + }
|
| + }
|
| +
|
| monitor.done();
|
| }
|
|
|
|
|