anchor.diff:          handleMessages();
         } catch(e, trace) {
           print("Unexpected exception:\n$e\n$trace");
  -        close();
  +        close(killDebugee: true);
         }
       };
       from.onClosed = () {
         print("Connection closed by debug target");
  -      close();
  +      close(killDebugee: true);
       };
       from.onError = (e) {
         print("Error '$e' detected in input stream from debug target");
  -      close();
  +      close(killDebugee: true);
       };
     }
   
  -  void close() {
  +  void close({killDebugee: false}) {
       if (errorsDetected) {
         for (int i = 0; i < errors.length; i++) print(errors[i]);
       }
       to.close();
       socket.close();
  -    targetProcess.kill();
  -    print("Target process killed");
  +    if (killDebugee) {
  +      targetProcess.kill();
  +      print("Target process killed");
  +    }
       Expect.isTrue(!errorsDetected);
       stdin.close();
       stdout.close();
  
positive.code: 
  import "dart:io";
  import "dart:utf";
  import "dart:json";
  
  // TODO(hausner): need to select a different port number for each
  // test that runs in parallel.
  
negative.code:     process.stdout.onData = process.stdout.read;
      process.stderr.onData = process.stderr.read;
      process.onExit = (int exitCode) {
        Expect.equals(0, exitCode);
        print("Debug target process exited with exit code $exitCode");
      };
      var debugger = new Debugger(process, debugPort);
      stdin.onClosed = () => debugger.close(killDebugee: true);
      stdin.onError = (error) => debugger.close(killDebugee: true);
      debugger.runScript(script);
    });
    return true;
  