anchor.diff:  void handlePausedEvent(msg) {
     assert(msg["params"] != null);
     var reason = msg["params"]["reason"];
  -  isolate_id = msg["params"]["isolateId"];
  -  assert(isolate_id != null);
  -  pausedLocation = msg["params"]["location"];
  -  assert(pausedLocation != null);
  +  int isolateId = msg["params"]["isolateId"];
  +  assert(isolateId != null);
  +  var isolate = targetIsolates[isolateId];
  +  assert(isolate != null);
  +  assert(!isolate.isPaused);
  +  var location = msg["params"]["location"];;
  +  assert(location != null);
  +  isolate.pausedLocation = location;
     if (reason == "breakpoint") {
  -    print("Isolate $isolate_id paused on breakpoint");
  -    print("location: $pausedLocation");
  +    print("Isolate $isolateId paused on breakpoint");
  +    print("location: ${formatLocation(location)}");
     } else if (reason == "interrupted") {
  -    print("Isolate $isolate_id paused due to an interrupt");
  +    print("Isolate $isolateId paused due to an interrupt");
  +    print("location: ${formatLocation(location)}");
     } else {
       assert(reason == "exception");
       var excObj = msg["params"]["exception"];
  -    print("Isolate $isolate_id paused on exception");
  +    print("Isolate $isolateId paused on exception");
       print(remoteObject(excObj));
     }
   }
   
  +void handleIsolateEvent(msg) {
  +  Map params = msg["params"];
  +  assert(params != null);
  +  var isolateId = params["id"];
  +  var reason = params["reason"];
  +  if (reason == "created") {
  +    print("Isolate $isolateId has been created.");
  +    assert(targetIsolates[isolateId] == null);
  +    targetIsolates[isolateId] = new TargetIsolate(isolateId);
  +    if (mainIsolate == null) {
  +      mainIsolate = targetIsolates[isolateId];
  +      currentIsolate = mainIsolate;
  +      print("Current isolate set to ${currentIsolate.id}.");
  +    }
  +  } else {
  +    assert(reason == "shutdown");
  +    var isolate = targetIsolates.remove(isolateId);
  +    assert(isolate != null);
  +    if (isolate == mainIsolate) {
  +      mainIsolate = null;
  +      print("Main isolate ${isolate.id} has terminated.");
  +    } else {
  +      print("Isolate ${isolate.id} has terminated.");
  +    }
  +    if (isolate == currentIsolate) {
  +      currentIsolate = mainIsolate;
  +      if (currentIsolate == null && !targetIsolates.isEmpty) {
  +        currentIsolate = targetIsolates.first;
  +      }
  +      if (currentIsolate != null) {
  +        print("Setting current isolate to ${currentIsolate.id}.");
  +      } else {
  +        print("All isolates have terminated.");
  +      }
  +    }
  +  }
  +}
   
   void processVmMessage(String jsonString) {
     var msg = JSON.decode(jsonString);
  
positive.code:     }
      var cmd = { "id": seqNum,
                  "command": "evaluateExpr",
                  "params": { "isolateId": isolate_id,
                              target: int.parse(args[2]),
                              "expression": expr } };
      cmdo.hide();
  
negative.code:   } else if (command == "rbp" && args.length == 2) {
      var cmd = { "id": seqNum,
                  "command": "removeBreakpoint",
                  "params": { "isolateId" : currentIsolate.id,
                              "breakpointId": int.parse(args[1]) } };
      cmdo.hide();
      sendCmd(cmd).then(showPromptAfter(handleGenericResponse));
    } else if (command == "ls" && args.length == 2) {
      var cmd = { "id": seqNum,
                  "command": "getScriptURLs",
                  "params": { "isolateId" : currentIsolate.id,
                              "libraryId": int.parse(args[1]) } };
      cmdo.hide();
      sendCmd(cmd).then(showPromptAfter(handleGetScriptsResponse));
  