OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // Library used by debugger wire protocol tests (standalone VM debugging). | 5 // Library used by debugger wire protocol tests (standalone VM debugging). |
6 | 6 |
7 library DartDebugger; | 7 library DartDebugger; |
8 | 8 |
| 9 import "dart:async"; |
9 import "dart:io"; | 10 import "dart:io"; |
10 import "dart:math"; | 11 import "dart:math"; |
11 import "dart:utf"; | 12 import "dart:utf"; |
12 import "dart:json" as JSON; | 13 import "dart:json" as JSON; |
13 | 14 |
14 // Whether or not to print the debugger wire messages on the console. | 15 // Whether or not to print the debugger wire messages on the console. |
15 var verboseWire = false; | 16 var verboseWire = false; |
16 | 17 |
17 // The number of attempts made to find an unused debugger port. | 18 // The number of attempts made to find an unused debugger port. |
18 var retries = 0; | 19 var retries = 0; |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 var trace = getAttachedStackTrace(e); | 527 var trace = getAttachedStackTrace(e); |
527 if (trace != null) print("StackTrace: $trace"); | 528 if (trace != null) print("StackTrace: $trace"); |
528 return -1; | 529 return -1; |
529 } else { | 530 } else { |
530 // Retry with another random port. | 531 // Retry with another random port. |
531 RunScript(script); | 532 RunScript(script); |
532 } | 533 } |
533 }); | 534 }); |
534 return true; | 535 return true; |
535 } | 536 } |
OLD | NEW |