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

Unified Diff: runtime/vm/debugger.cc

Issue 1116263004: Add 'dart:debugger' library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 05ecbcbdb5b33d7d8ee58ecc9bbd19f1a16c572f..5fc539ddd2b532378602828dcf4529d889062505 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -2275,6 +2275,29 @@ void Debugger::SignalBpReached() {
}
+void Debugger::BreakHere() {
+ // We ignore this breakpoint when the VM is executing code invoked
+ // by the debugger to evaluate variables values, or when we see a nested
+ // breakpoint or exception event.
+ if (ignore_breakpoints_ || IsPaused() || !HasEventHandler()) {
+ return;
+ }
+
+ DebuggerStackTrace* stack_trace = CollectStackTrace();
+ ASSERT(stack_trace->Length() > 0);
+ ASSERT(stack_trace_ == NULL);
+ stack_trace_ = stack_trace;
+
+ // We are in the native call to Debugger_breakHere or Debugger_breakHereIf,
+ // the developer gets a better experience by not seeing this call. To
+ // accomplish this, we continue execution until the call exits (step out).
+ SetStepOut();
+ HandleSteppingRequest(stack_trace_);
+
+ stack_trace_ = NULL;
+}
+
+
void Debugger::Initialize(Isolate* isolate) {
if (initialized_) {
return;
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698