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:io"; | 10 import "dart:io"; |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 if (msg["event"] == "isolate") { | 419 if (msg["event"] == "isolate") { |
420 if (msg["params"]["reason"] == "created") { | 420 if (msg["params"]["reason"] == "created") { |
421 isolateId = msg["params"]["id"]; | 421 isolateId = msg["params"]["id"]; |
422 assert(isolateId != null); | 422 assert(isolateId != null); |
423 print("Debuggee isolate id $isolateId created."); | 423 print("Debuggee isolate id $isolateId created."); |
424 } else if (msg["params"]["reason"] == "shutdown") { | 424 } else if (msg["params"]["reason"] == "shutdown") { |
425 print("Debuggee isolate id ${msg["params"]["id"]} shut down."); | 425 print("Debuggee isolate id ${msg["params"]["id"]} shut down."); |
426 shutdownEventSeen = true; | 426 shutdownEventSeen = true; |
427 if (!script.isEmpty) { | 427 if (!script.isEmpty) { |
428 error("Error: premature isolate shutdown event seen."); | 428 error("Error: premature isolate shutdown event seen."); |
| 429 error("Next expected event: ${script.currentEntry}"); |
429 } | 430 } |
430 } | 431 } |
431 } else if (msg["event"] == "breakpointResolved") { | 432 } else if (msg["event"] == "breakpointResolved") { |
432 var bpId = msg["params"]["breakpointId"]; | 433 var bpId = msg["params"]["breakpointId"]; |
433 assert(bpId != null); | 434 assert(bpId != null); |
434 var isolateId = msg["params"]["isolateId"]; | 435 var isolateId = msg["params"]["isolateId"]; |
435 assert(isolateId != null); | 436 assert(isolateId != null); |
436 var location = msg["params"]["location"]; | 437 var location = msg["params"]["location"]; |
437 assert(location != null); | 438 assert(location != null); |
438 print("Isolate $isolateId: breakpoint $bpId resolved" | 439 print("Isolate $isolateId: breakpoint $bpId resolved" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 targetOpts.add("--debuggee"); | 614 targetOpts.add("--debuggee"); |
614 print('args: ${targetOpts.join(" ")}'); | 615 print('args: ${targetOpts.join(" ")}'); |
615 | 616 |
616 Process.start(Platform.executable, targetOpts).then((Process process) { | 617 Process.start(Platform.executable, targetOpts).then((Process process) { |
617 print("Debug target process started, pid ${process.pid}."); | 618 print("Debug target process started, pid ${process.pid}."); |
618 process.stdin.close(); | 619 process.stdin.close(); |
619 var debugger = new Debugger(process, new DebugScript(script)); | 620 var debugger = new Debugger(process, new DebugScript(script)); |
620 }); | 621 }); |
621 return true; | 622 return true; |
622 } | 623 } |
OLD | NEW |