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

Side by Side Diff: tools/ddbg.dart

Issue 23514020: Evaluation of expression in context of library top-level (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months 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 | « runtime/vm/object.cc ('k') | no next file » | 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:convert"; 8 import "dart:convert";
9 import "dart:io"; 9 import "dart:io";
10 import "dart:async"; 10 import "dart:async";
(...skipping 21 matching lines...) Expand all
32 bt Show backtrace 32 bt Show backtrace
33 r Resume execution 33 r Resume execution
34 s Single step 34 s Single step
35 so Step over 35 so Step over
36 si Step into 36 si Step into
37 sbp [<file>] <line> Set breakpoint 37 sbp [<file>] <line> Set breakpoint
38 rbp <id> Remove breakpoint with given id 38 rbp <id> Remove breakpoint with given id
39 po <id> Print object info for given id 39 po <id> Print object info for given id
40 eval obj <id> <expr> Evaluate expr on object id 40 eval obj <id> <expr> Evaluate expr on object id
41 eval cls <id> <expr> Evaluate expr on class id 41 eval cls <id> <expr> Evaluate expr on class id
42 eval lib <id> <expr> Evaluate expr in toplevel of library id
42 pl <id> <idx> [<len>] Print list element/slice 43 pl <id> <idx> [<len>] Print list element/slice
43 pc <id> Print class info for given id 44 pc <id> Print class info for given id
44 ll List loaded libraries 45 ll List loaded libraries
45 plib <id> Print library info for given library id 46 plib <id> Print library info for given library id
46 slib <id> <true|false> Set library id debuggable 47 slib <id> <true|false> Set library id debuggable
47 pg <id> Print all global variables visible within given library id 48 pg <id> Print all global variables visible within given library id
48 ls <lib_id> List loaded scripts in library 49 ls <lib_id> List loaded scripts in library
49 gs <lib_id> <script_url> Get source text of script in library 50 gs <lib_id> <script_url> Get source text of script in library
50 tok <lib_id> <script_url> Get line and token table of script in library 51 tok <lib_id> <script_url> Get line and token table of script in library
51 epi <none|all|unhandled> Set exception pause info 52 epi <none|all|unhandled> Set exception pause info
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 "params": { "isolateId" : isolate_id, 132 "params": { "isolateId" : isolate_id,
132 "libraryId": int.parse(args[1]) } }; 133 "libraryId": int.parse(args[1]) } };
133 sendCmd(cmd).then((result) => handleGetScriptsResponse(result)); 134 sendCmd(cmd).then((result) => handleGetScriptsResponse(result));
134 } else if (command == "eval" && args.length > 3) { 135 } else if (command == "eval" && args.length > 3) {
135 var expr = args.getRange(3, args.length).join(" "); 136 var expr = args.getRange(3, args.length).join(" ");
136 var target = args[1]; 137 var target = args[1];
137 if (target == "obj") { 138 if (target == "obj") {
138 target = "objectId"; 139 target = "objectId";
139 } else if (target == "cls") { 140 } else if (target == "cls") {
140 target = "classId"; 141 target = "classId";
142 } else if (target == "lib") {
143 target = "libraryId";
141 } else { 144 } else {
142 huh(); 145 huh();
143 return; 146 return;
144 } 147 }
145 var cmd = { "id": seqNum, 148 var cmd = { "id": seqNum,
146 "command": "evaluateExpr", 149 "command": "evaluateExpr",
147 "params": { "isolateId": isolate_id, 150 "params": { "isolateId": isolate_id,
148 target: int.parse(args[2]), 151 target: int.parse(args[2]),
149 "expression": expr } }; 152 "expression": expr } };
150 sendCmd(cmd).then((result) => handleEvalResponse(result)); 153 sendCmd(cmd).then((result) => handleEvalResponse(result));
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 process.stdin.close(); 635 process.stdin.close();
633 process.exitCode.then((int exitCode) { 636 process.exitCode.then((int exitCode) {
634 print('${arguments.join(" ")} exited with $exitCode'); 637 print('${arguments.join(" ")} exited with $exitCode');
635 }); 638 });
636 debuggerMain(); 639 debuggerMain();
637 }); 640 });
638 } else { 641 } else {
639 debuggerMain(); 642 debuggerMain();
640 } 643 }
641 } 644 }
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698