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

Unified Diff: sdk/lib/debugger/debugger.dart

Issue 1116263004: Add 'dart:debugger' library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
Index: sdk/lib/debugger/debugger.dart
diff --git a/sdk/lib/debugger/debugger.dart b/sdk/lib/debugger/debugger.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a18e3b84acf8e7e49452ea24b0906f1598a22a3d
--- /dev/null
+++ b/sdk/lib/debugger/debugger.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
hausner 2015/05/05 00:16:27 2015
Cutch 2015/05/05 02:38:53 Done.
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Programmatically trigger breakpoints.
+library dart.debugger;
+
+/// Programmatically trigger breakpoints.
+class Debugger {
+ /// Trigger a breakpoint. In other words, when invoked, the isolate will
+ /// not return until a debugger continues execution. The behaviour is the same
+ /// regardless of whether or not a debugger is connected.
+ static void breakpoint() {
+ print('Debugger.breakpoint not supported by your embedder.');
hausner 2015/05/05 00:16:27 ... by this embedder ... ? or: on this platform
Cutch 2015/05/05 02:38:53 Done.
+ }
+
+ /// Call [breakpoint] if [expr] is true.
+ static void breakpointIf(bool expr) {
+ if (expr) {
+ breakpoint();
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698