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

Unified Diff: runtime/vm/service_event.cc

Issue 1174313002: Allow setting break-on-exceptions option over the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/service.cc ('K') | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 2c6680df21b2c1cc862434a8154dd7ddf25bfa73..75aff2e4d794f52d39ee09becc1b68926a45e0e1 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -84,6 +84,8 @@ const char* ServiceEvent::EventTypeToCString(EventType type) {
return "GC"; // TODO(koda): Change to GarbageCollected.
case kInspect:
return "Inspect";
+ case kDebuggerUpdate:
Cutch 2015/06/12 13:10:47 kDebuggerSettingsUpdate ?
rmacnak 2015/06/15 17:53:51 Done.
+ return "_DebuggerUpdate";
case kIllegal:
return "Illegal";
default:
@@ -110,6 +112,7 @@ const char* ServiceEvent::stream_id() const {
case kBreakpointResolved:
case kBreakpointRemoved:
case kInspect:
+ case kDebuggerUpdate:
return "Debug";
case kGC:
@@ -139,6 +142,22 @@ void ServiceEvent::PrintJSON(JSONStream* js) const {
jsobj.AddProperty("breakpoint", breakpoint());
}
}
+ if (type() == kDebuggerUpdate) {
+ // This won't cut it when we support filtering by class, etc.
+ switch (isolate()->debugger()->GetExceptionPauseInfo()) {
+ case kNoPauseOnExceptions:
+ jsobj.AddProperty("_exceptions", "none");
+ break;
+ case kPauseOnAllExceptions:
+ jsobj.AddProperty("_exceptions", "all");
+ break;
+ case kPauseOnUnhandledExceptions:
+ jsobj.AddProperty("_exceptions", "unhandled");
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
if (top_frame() != NULL) {
JSONObject jsFrame(&jsobj, "topFrame");
top_frame()->PrintToJSONObject(&jsFrame);
« runtime/vm/service.cc ('K') | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698