| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Simple interactive debugger shell that connects to the Dart VM's debugger | 5 // Simple interactive debugger shell that connects to the Dart VM's debugger |
| 6 // connection port. | 6 // connection port. |
| 7 | 7 |
| 8 import "dart:convert"; | 8 import "dart:convert"; |
| 9 import "dart:io"; | 9 import "dart:io"; |
| 10 import "dart:async"; | 10 import "dart:async"; |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 assert(isolate != null); | 1141 assert(isolate != null); |
| 1142 if (isolate == mainIsolate) { | 1142 if (isolate == mainIsolate) { |
| 1143 mainIsolate = null; | 1143 mainIsolate = null; |
| 1144 print("Main isolate ${isolate.id} has terminated."); | 1144 print("Main isolate ${isolate.id} has terminated."); |
| 1145 } else { | 1145 } else { |
| 1146 print("Isolate ${isolate.id} has terminated."); | 1146 print("Isolate ${isolate.id} has terminated."); |
| 1147 } | 1147 } |
| 1148 if (isolate == currentIsolate) { | 1148 if (isolate == currentIsolate) { |
| 1149 currentIsolate = mainIsolate; | 1149 currentIsolate = mainIsolate; |
| 1150 if (currentIsolate == null && !targetIsolates.isEmpty) { | 1150 if (currentIsolate == null && !targetIsolates.isEmpty) { |
| 1151 currentIsolate = targetIsolates.first; | 1151 currentIsolate = targetIsolates.values.first; |
| 1152 } | 1152 } |
| 1153 if (currentIsolate != null) { | 1153 if (currentIsolate != null) { |
| 1154 print("Setting current isolate to ${currentIsolate.id}."); | 1154 print("Setting current isolate to ${currentIsolate.id}."); |
| 1155 } else { | 1155 } else { |
| 1156 print("All isolates have terminated."); | 1156 print("All isolates have terminated."); |
| 1157 } | 1157 } |
| 1158 } | 1158 } |
| 1159 } | 1159 } |
| 1160 } | 1160 } |
| 1161 | 1161 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 handleUncaughtError: debuggerError)); | 1482 handleUncaughtError: debuggerError)); |
| 1483 | 1483 |
| 1484 zone.run(() { | 1484 zone.run(() { |
| 1485 parseArgs(args); | 1485 parseArgs(args); |
| 1486 cmdo = new Commando(completer: debuggerCommandCompleter); | 1486 cmdo = new Commando(completer: debuggerCommandCompleter); |
| 1487 cmdSubscription = cmdo.commands.listen(processCommand, | 1487 cmdSubscription = cmdo.commands.listen(processCommand, |
| 1488 onError: processError, | 1488 onError: processError, |
| 1489 onDone: processDone); | 1489 onDone: processDone); |
| 1490 }); | 1490 }); |
| 1491 } | 1491 } |
| OLD | NEW |