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

Unified Diff: tools/ddbg.dart

Issue 10496006: Add string encoding to wire protocol (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ddbg.dart
===================================================================
--- tools/ddbg.dart (revision 8218)
+++ tools/ddbg.dart (working copy)
@@ -39,6 +39,7 @@
ll List loaded libraries
pl <id> Print dlibrary info for given id
ls <libname> List loaded scripts in library
+ gs <lib_id> <script_url> Get source text of script in library
h Print help
""");
}
@@ -117,6 +118,11 @@
var cmd = { "id": seqNum, "command": "getLibraryProperties",
"params": {"libraryId": Math.parseInt(args[1]) }};
sendCmd(cmd).then((result) => handleGetLibraryPropsResponse(result));
+ } else if (command == "gs" && args.length == 3) {
+ var cmd = { "id": seqNum, "command": "getScriptSource",
+ "params": { "libraryId": Math.parseInt(args[1]),
+ "url": args[2] }};
+ sendCmd(cmd).then((result) => handleGetSourceResponse(result));
} else if (command == "q") {
quitShell();
} else if (command == "h") {
@@ -197,6 +203,13 @@
}
+handleGetSourceResponse(response) {
+ Map result = response["result"];
+ String source = result["text"];
+ print("Source text:\n$source\n--------");
+}
+
+
void handleGetLibraryResponse(response) {
Map result = response["result"];
List libs = result["libraries"];
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698