Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: tools/ddbg.dart

Issue 11360028: Only start http server for browser tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:io"); 8 #import("dart:io");
9 #import("dart:json"); 9 #import("dart:json");
10 #import("dart:math", prefix: "Math"); 10 #import("dart:math", prefix: "Math");
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 57
58 void quitShell() { 58 void quitShell() {
59 vmStream.close(); 59 vmStream.close();
60 vmSock.close(); 60 vmSock.close();
61 stdin.close(); 61 stdin.close();
62 } 62 }
63 63
64 64
65 Future sendCmd(Map<String, Dynamic> cmd) { 65 Future sendCmd(Map<String, dynamic> cmd) {
66 var completer = new Completer(); 66 var completer = new Completer();
67 int id = cmd["id"]; 67 int id = cmd["id"];
68 outstandingCommands[id] = completer; 68 outstandingCommands[id] = completer;
69 if (verbose) { 69 if (verbose) {
70 print("sending: '${JSON.stringify(cmd)}'"); 70 print("sending: '${JSON.stringify(cmd)}'");
71 } 71 }
72 vmStream.writeString(JSON.stringify(cmd)); 72 vmStream.writeString(JSON.stringify(cmd));
73 return completer.future; 73 return completer.future;
74 } 74 }
75 75
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 }; 541 };
542 vmInStream.onError = (err) { 542 vmInStream.onError = (err) {
543 print("Error in debug connection: $err"); 543 print("Error in debug connection: $err");
544 quitShell(); 544 quitShell();
545 }; 545 };
546 vmInStream.onClosed = () { 546 vmInStream.onClosed = () {
547 print("VM debugger connection closed"); 547 print("VM debugger connection closed");
548 quitShell(); 548 quitShell();
549 }; 549 };
550 } 550 }
OLDNEW
« no previous file with comments | « no previous file | tools/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698