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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/lib/developer/developer.dart

Issue 2534263002: Make the dart:developer library available in DDC so debugger statement works (Closed)
Patch Set: Merged Created 4 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// Interact with developer tools such as the debugger and inspector.
6 ///
7 /// The dart:developer library is _unstable_ and its API might change slightly
8 /// as a result of developer feedback. This library is platform dependent and
9 /// therefore it has implementations for both dart2js and the Dart VM. Both are
10 /// under development and may not support all operations yet.
11 ///
12 /// To use this library in your code:
13 ///
14 /// import 'dart:developer';
15 ///
16 library dart.developer;
17
18 import 'dart:async';
19 import 'dart:convert';
20 import 'dart:isolate' show RawReceivePort, SendPort;
21
22 part 'extension.dart';
23 part 'profiler.dart';
24 part 'timeline.dart';
25 part 'service.dart';
26
27 /// If [when] is true, stop the program as if a breakpoint were hit at the
28 /// following statement.
29 ///
30 /// Returns the value of [when]. Some debuggers may display [message].
31 ///
32 /// NOTE: When invoked, the isolate will not return until a debugger
33 /// continues execution. When running in the Dart VM the behaviour is the same
34 /// regardless of whether or not a debugger is connected. When compiled to
35 /// JavaScript, this uses the "debugger" statement, and behaves exactly as
36 /// that does.
37 external bool debugger({bool when: true, String message});
38
39 /// Send a reference to [object] to any attached debuggers.
40 ///
41 /// Debuggers may open an inspector on the object. Returns the argument.
42 external Object inspect(Object object);
43
44 /// Emit a log event.
45 /// [message] is the log message.
46 /// [time] (optional) is the timestamp.
47 /// [sequenceNumber] (optional) is a monotonically increasing sequence number.
48 /// [level] (optional) is the severity level (value between 0 and 2000).
49 /// [name] (optional) is the name of the source of the log message.
50 /// [zone] (optional) the zone where the log was emitted
51 /// [error] (optional) an error object associated with this log event.
52 /// [stackTrace] (optional) a stack trace associated with this log event.
53 external void log(String message,
54 {DateTime time,
55 int sequenceNumber,
56 int level: 0,
57 String name: '',
58 Zone zone,
59 Object error,
60 StackTrace stackTrace});
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698