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:io"; | 9 import "dart:io"; |
10 import "dart:utf"; | 10 import "dart:utf"; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 Command lastCommand = null; // Most recent command sent to target. | 317 Command lastCommand = null; // Most recent command sent to target. |
318 List<String> errors = new List(); | 318 List<String> errors = new List(); |
319 | 319 |
320 // Data collected from debug target. | 320 // Data collected from debug target. |
321 Map currentMessage = null; // Currently handled message sent by target. | 321 Map currentMessage = null; // Currently handled message sent by target. |
322 String scriptUrl = null; | 322 String scriptUrl = null; |
323 bool shutdownEventSeen = false; | 323 bool shutdownEventSeen = false; |
324 int isolateId = 0; | 324 int isolateId = 0; |
325 | 325 |
326 Debugger(this.targetProcess, this.portNumber) { | 326 Debugger(this.targetProcess, this.portNumber) { |
327 stdin.listen((_) {}); | |
Ivan Posva
2013/03/26 16:49:40
OK?
| |
327 var stdoutStringStream = targetProcess.stdout | 328 var stdoutStringStream = targetProcess.stdout |
328 .transform(new StringDecoder()) | 329 .transform(new StringDecoder()) |
329 .transform(new LineTransformer()); | 330 .transform(new LineTransformer()); |
330 stdoutStringStream.listen((line) { | 331 stdoutStringStream.listen((line) { |
331 if (showDebuggeeOutput) { | 332 if (showDebuggeeOutput) { |
332 print("TARG: $line"); | 333 print("TARG: $line"); |
333 } | 334 } |
334 }); | 335 }); |
335 | 336 |
336 var stderrStringStream = targetProcess.stderr | 337 var stderrStringStream = targetProcess.stderr |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 process.stdin.close(); | 524 process.stdin.close(); |
524 process.exitCode.then((int exitCode) { | 525 process.exitCode.then((int exitCode) { |
525 Expect.equals(0, exitCode); | 526 Expect.equals(0, exitCode); |
526 print("Debug target process exited with exit code $exitCode"); | 527 print("Debug target process exited with exit code $exitCode"); |
527 }); | 528 }); |
528 var debugger = new Debugger(process, debugPort); | 529 var debugger = new Debugger(process, debugPort); |
529 debugger.runScript(script); | 530 debugger.runScript(script); |
530 }); | 531 }); |
531 return true; | 532 return true; |
532 } | 533 } |
OLD | NEW |