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:async"; |
10 import "dart:convert"; | 10 import "dart:convert"; |
11 import "dart:io"; | 11 import "dart:io"; |
12 import "dart:math"; | 12 import "dart:math"; |
13 import "dart:utf"; | |
14 import "dart:json" as JSON; | 13 import "dart:json" as JSON; |
15 | 14 |
16 // 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. |
17 var verboseWire = false; | 16 var verboseWire = false; |
18 | 17 |
19 // Class to buffer wire protocol data from debug target and | 18 // Class to buffer wire protocol data from debug target and |
20 // break it down to individual json messages. | 19 // break it down to individual json messages. |
21 class JsonBuffer { | 20 class JsonBuffer { |
22 String buffer = null; | 21 String buffer = null; |
23 | 22 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 targetOpts.add("--debuggee"); | 615 targetOpts.add("--debuggee"); |
617 print('args: ${targetOpts.join(" ")}'); | 616 print('args: ${targetOpts.join(" ")}'); |
618 | 617 |
619 Process.start(Platform.executable, targetOpts).then((Process process) { | 618 Process.start(Platform.executable, targetOpts).then((Process process) { |
620 print("Debug target process started, pid ${process.pid}."); | 619 print("Debug target process started, pid ${process.pid}."); |
621 process.stdin.close(); | 620 process.stdin.close(); |
622 var debugger = new Debugger(process, new DebugScript(script)); | 621 var debugger = new Debugger(process, new DebugScript(script)); |
623 }); | 622 }); |
624 return true; | 623 return true; |
625 } | 624 } |
OLD | NEW |