| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 bool checkPaused() { | 109 bool checkPaused() { |
| 110 if (!checkCurrentIsolate()) return false; | 110 if (!checkCurrentIsolate()) return false; |
| 111 if (currentIsolate.isPaused) return true; | 111 if (currentIsolate.isPaused) return true; |
| 112 print("Current isolate must be paused"); | 112 print("Current isolate must be paused"); |
| 113 return false; | 113 return false; |
| 114 } | 114 } |
| 115 | 115 |
| 116 typedef void HandlerType(Map response); | 116 typedef void HandlerType(Map response); |
| 117 | 117 |
| 118 HandlerType showPromptAfter(void handler(Map response)) { | 118 HandlerType showPromptAfter(void handler(Map response)) { |
| 119 // Hide the command prompt immediately. | |
| 120 return (response) { | 119 return (response) { |
| 121 handler(response); | 120 handler(response); |
| 122 cmdo.show(); | 121 cmdo.show(); |
| 123 }; | 122 }; |
| 124 } | 123 } |
| 125 | 124 |
| 126 | 125 |
| 127 void processCommand(String cmdLine) { | 126 void processCommand(String cmdLine) { |
| 128 | 127 |
| 129 void huh() { | 128 void huh() { |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 print('Program exited with code $exitCode.'); | 836 print('Program exited with code $exitCode.'); |
| 838 } | 837 } |
| 839 }); | 838 }); |
| 840 | 839 |
| 841 debuggerMain(); | 840 debuggerMain(); |
| 842 }); | 841 }); |
| 843 } else { | 842 } else { |
| 844 debuggerMain(); | 843 debuggerMain(); |
| 845 } | 844 } |
| 846 } | 845 } |
| OLD | NEW |