anchor.diff:    if (arguments.length > 0) {
       arguments = <String>['--debug', '--verbose_debug']..addAll(arguments);
       Process.start(options.executable, arguments).then((Process process) {
  -      process.onExit = (int exitCode) {
  +      process.stdin.close();
  +      process.exitCode.then((int exitCode) {
           print('${arguments.join(" ")} exited with $exitCode');
  -      };
  -      process.stdin.close();
  -      // Redirecting both stdout and stderr of the child process to
  -      // stdout.  This should help users keep track of which errors
  -      // are coming from the debugger, and which errors are coming
  -      // from the process being debugged.
  -      process.stderr.pipe(stdout);
  -      process.stdout.pipe(stdout);
  +      });
         debuggerMain();
       });
     } else {
  
positive.code: 
  
  void quitShell() {
    vmStream.close();
    vmSock.close();
    stdin.close();
  }
  
negative.code: 
  void debuggerMain() {
    outstandingCommands = new Map<int, Completer>();
    Socket.connect("127.0.0.1", 5858).then((s) {
      vmSock = s;
      Stream<String> stringStream = vmSock.transform(new StringDecoder());
      streamSubscription = stringStream.listen(
          (String data) {
            processVmData(data);
          },
          onDone: () {
            print("VM debugger connection closed");
            quitShell();
          },
          onError: (err) {
            print("Error in debug connection: $err");
            quitShell();
          });
      stdin.transform(new StringDecoder())
          .transform(new LineTransformer())
          .listen((String line) => processCommand(line));
    });
  }
  
  void main() {
  