| Index: runtime/vm/isolate.cc
|
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
|
| index a90137d56724e31b06c859c90c39b4e2f7367487..74d0394a57ab2dae0801233c96f34af7cf807a54 100644
|
| --- a/runtime/vm/isolate.cc
|
| +++ b/runtime/vm/isolate.cc
|
| @@ -43,6 +43,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, break_at_isolate_spawn, false,
|
| + "Insert a one-time breakpoint at the entrypoint for all spawned "
|
| + "isolates");
|
|
|
|
|
| // Quick access to the locally defined isolate() method.
|
| @@ -836,6 +839,14 @@ static bool RunIsolate(uword parameter) {
|
| func ^= result.raw();
|
| func = func.ImplicitClosureFunction();
|
|
|
| + // TODO(turnidge): Currently we need a way to force a one-time
|
| + // breakpoint for all spawned isolates to support isolate
|
| + // debugging. Remove this once the vmservice becomes the standard
|
| + // way to debug.
|
| + if (FLAG_break_at_isolate_spawn) {
|
| + isolate->debugger()->OneTimeBreakAtEntry(func);
|
| + }
|
| +
|
| const Array& capabilities = Array::Handle(Array::New(2));
|
| Capability& capability = Capability::Handle();
|
| capability = Capability::New(isolate->pause_capability());
|
|
|