Index: runtime/observatory/lib/src/elements/script_inset.dart |
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart |
index cc4787a665eb6897fa9b5eca5f7ae0d5ce2159d0..73ee4570112870e4949aaa47266734b71881d20e 100644 |
--- a/runtime/observatory/lib/src/elements/script_inset.dart |
+++ b/runtime/observatory/lib/src/elements/script_inset.dart |
@@ -284,15 +284,19 @@ class BreakpointToggleElement extends ObservatoryElement { |
return; |
} |
busy = true; |
- if (line.bpt == null) { |
+ if (line.breakpoints == null) { |
// No breakpoint. Add it. |
line.script.isolate.addBreakpoint(line.script, line.line).then((_) { |
busy = false; |
}); |
} else { |
// Existing breakpoint. Remove it. |
- line.script.isolate.removeBreakpoint(line.bpt).then((_) { |
- busy = false; |
+ List pending = []; |
+ for (var bpt in line.breakpoints) { |
+ pending.add(line.script.isolate.removeBreakpoint(bpt)); |
+ } |
+ Future.wait(pending).then((_) { |
+ busy = false; |
}); |
} |
} |