| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 [ new HelpCommand(), | 114 [ new HelpCommand(), |
| 115 new QuitCommand(), | 115 new QuitCommand(), |
| 116 new RunCommand(), | 116 new RunCommand(), |
| 117 new KillCommand(), | 117 new KillCommand(), |
| 118 new ConnectCommand(), | 118 new ConnectCommand(), |
| 119 new DisconnectCommand(), | 119 new DisconnectCommand(), |
| 120 new SetCommand(), | 120 new SetCommand(), |
| 121 new ShowCommand() ]; | 121 new ShowCommand() ]; |
| 122 | 122 |
| 123 | 123 |
| 124 Command matchCommand(String commandName, bool exactMatchWins) { | 124 List<Command> matchCommand(String commandName, bool exactMatchWins) { |
| 125 List matches = []; | 125 List matches = []; |
| 126 for (var command in commandList) { | 126 for (var command in commandList) { |
| 127 if (command.name.startsWith(commandName)) { | 127 if (command.name.startsWith(commandName)) { |
| 128 if (exactMatchWins && command.name == commandName) { | 128 if (exactMatchWins && command.name == commandName) { |
| 129 // Exact match | 129 // Exact match |
| 130 return [command]; | 130 return [command]; |
| 131 } else { | 131 } else { |
| 132 matches.add(command); | 132 matches.add(command); |
| 133 } | 133 } |
| 134 } | 134 } |
| (...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 handleUncaughtError: debuggerError)); | 1409 handleUncaughtError: debuggerError)); |
| 1410 | 1410 |
| 1411 zone.run(() { | 1411 zone.run(() { |
| 1412 parseArgs(args); | 1412 parseArgs(args); |
| 1413 cmdo = new Commando(completer: debuggerCommandCompleter); | 1413 cmdo = new Commando(completer: debuggerCommandCompleter); |
| 1414 cmdSubscription = cmdo.commands.listen(processCommand, | 1414 cmdSubscription = cmdo.commands.listen(processCommand, |
| 1415 onError: processError, | 1415 onError: processError, |
| 1416 onDone: processDone); | 1416 onDone: processDone); |
| 1417 }); | 1417 }); |
| 1418 } | 1418 } |
| OLD | NEW |