OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// Interact with developer tools such as the debugger and inspector. | 5 /// Interact with developer tools such as the debugger and inspector. |
6 /// | 6 /// |
7 /// The dart:developer library is _unstable_ and its API might change slightly | 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 | 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 | 9 /// therefore it has implementations for both dart2js and the Dart VM. Both are |
10 /// under development and may not support all operations yet. | 10 /// under development and may not support all operations yet. |
11 /// | 11 /// |
12 /// To use this library in your code: | 12 /// To use this library in your code: |
13 /// | 13 /// |
14 /// import 'dart:developer'; | 14 /// import 'dart:developer'; |
15 /// | 15 /// |
16 library dart.developer; | 16 library dart.developer; |
17 | 17 |
18 import 'dart:async'; | 18 import 'dart:async'; |
19 import 'dart:convert'; | 19 import 'dart:convert'; |
20 | 20 |
21 part 'extension.dart'; | 21 part 'extension.dart'; |
22 part 'profiler.dart'; | 22 part 'profiler.dart'; |
23 part 'timeline.dart'; | 23 part 'timeline.dart'; |
| 24 part 'service.dart'; |
24 | 25 |
25 /// If [when] is true, stop the program as if a breakpoint were hit at the | 26 /// If [when] is true, stop the program as if a breakpoint were hit at the |
26 /// following statement. | 27 /// following statement. |
27 /// | 28 /// |
28 /// Returns the value of [when]. Some debuggers may display [message]. | 29 /// Returns the value of [when]. Some debuggers may display [message]. |
29 /// | 30 /// |
30 /// NOTE: When invoked, the isolate will not return until a debugger | 31 /// NOTE: When invoked, the isolate will not return until a debugger |
31 /// continues execution. When running in the Dart VM the behaviour is the same | 32 /// continues execution. When running in the Dart VM the behaviour is the same |
32 /// regardless of whether or not a debugger is connected. When compiled to | 33 /// regardless of whether or not a debugger is connected. When compiled to |
33 /// JavaScript, this uses the "debugger" statement, and behaves exactly as | 34 /// JavaScript, this uses the "debugger" statement, and behaves exactly as |
(...skipping 15 matching lines...) Expand all Loading... |
49 /// [error] (optional) an error object associated with this log event. | 50 /// [error] (optional) an error object associated with this log event. |
50 /// [stackTrace] (optional) a stack trace associated with this log event. | 51 /// [stackTrace] (optional) a stack trace associated with this log event. |
51 external void log(String message, | 52 external void log(String message, |
52 {DateTime time, | 53 {DateTime time, |
53 int sequenceNumber, | 54 int sequenceNumber, |
54 int level: 0, | 55 int level: 0, |
55 String name: '', | 56 String name: '', |
56 Zone zone, | 57 Zone zone, |
57 Object error, | 58 Object error, |
58 StackTrace stackTrace}); | 59 StackTrace stackTrace}); |
OLD | NEW |