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

Unified Diff: tools/ddbg.dart

Issue 10537065: Debugger break on TypeError, AssertionError (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
« runtime/vm/exceptions.cc ('K') | « runtime/vm/exceptions.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 8413)
+++ tools/ddbg.dart (working copy)
@@ -134,22 +134,27 @@
}
-printNamedObject(obj) {
- var name = obj["name"];
- var value = obj["value"];
+String remoteValue(value) {
var kind = value["kind"];
var text = value["text"];
var id = value["objectId"];
if (kind == "string") {
- print(" $name = '$text'");
+ return "'$text'";
} else if (kind == "object") {
- print(" $name (id:$id) = $text");
+ return "(obj id: $id) = $text";
} else {
- print(" $name = $text");
+ return "$text";
}
}
+printNamedObject(obj) {
+ var name = obj["name"];
+ var value = obj["value"];
+ print(" $name = ${remoteValue(value)}");
+}
+
+
handleGetObjPropsResponse(response) {
Map props = response["result"];
int class_id = props["classId"];
@@ -276,11 +281,20 @@
void handlePausedEvent(msg) {
assert(msg["params"] != null);
+ var reason = msg["params"]["reason"];
stackTrace = msg["params"]["callFrames"];
assert(stackTrace != null);
assert(stackTrace.length >= 1);
curFrame = stackTrace[0];
- print("VM paused, stack trace:");
+ if (reason == "breakpoint") {
+ print("VM paused on breakpoint");
+ } else {
+ assert(reason == "exception");
+ var excObj = msg["params"]["exception"];
+ print("VM paused on exception");
+ print(remoteValue(excObj));
+ }
+ print("Stack trace:");
printStackTrace(stackTrace);
}
« runtime/vm/exceptions.cc ('K') | « runtime/vm/exceptions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698