Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 5c764df99fef660f2e0a21bf014d6906716efc79..a62ac0ea989415e03b76dcc5f658511fe4edd706 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -58,6 +58,9 @@ DEFINE_FLAG(bool, pause_isolates_on_start, false, |
"Pause isolates before starting."); |
DEFINE_FLAG(bool, pause_isolates_on_exit, false, |
"Pause isolates exiting."); |
+DEFINE_FLAG(bool, pause_isolates_on_unhandled_exceptions, false, |
+ "Pause isolates on unhandled exceptions."); |
+ |
DEFINE_FLAG(bool, break_at_isolate_spawn, false, |
"Insert a one-time breakpoint at the entrypoint for all spawned " |
"isolates"); |
@@ -1070,6 +1073,9 @@ bool Isolate::MakeRunnable() { |
if (!ServiceIsolate::IsServiceIsolate(this)) { |
message_handler()->set_pause_on_start(FLAG_pause_isolates_on_start); |
message_handler()->set_pause_on_exit(FLAG_pause_isolates_on_exit); |
+ if (FLAG_pause_isolates_on_unhandled_exceptions) { |
+ debugger()->SetExceptionPauseInfo(kPauseOnUnhandledExceptions); |
+ } |
} |
IsolateSpawnState* state = spawn_state(); |
if (state != NULL) { |