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

Side by Side Diff: pkg/stack_trace/README.md

Issue 13102003: Add a library for manipulating stack traces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/pkg.status ('k') | pkg/stack_trace/lib/src/frame.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 This library provides the ability to parse, inspect, and manipulate stack traces
2 produced by the underlying Dart implementation. It also provides functions to
3 produce string representations of stack traces in a more readable format than
4 the native [StackTrace] implementation.
5
6 `Trace`s can be parsed from native [StackTrace]s using `Trace.from`, or captured
7 using `Trace.current`. Native [StackTrace]s can also be directly converted to
8 human-readable strings using `Trace.format`.
9
10 [StackTrace]: http://api.dartlang.org/docs/releases/latest/dart_core/StackTrace. html
11
12 Here's an example native stack trace from debugging this library:
13
14 #0 Object.noSuchMethod (dart:core-patch:1884:25)
15 #1 Trace.terse.<anonymous closure> (file:///usr/local/google-old/home/g oog/dart/dart/pkg/stack_trace/lib/src/trace.dart:47:21)
16 #2 IterableMixinWorkaround.reduce (dart:collection:29:29)
17 #3 List.reduce (dart:core-patch:1247:42)
18 #4 Trace.terse (file:///usr/local/google-old/home/goog/dart/dart/pkg/st ack_trace/lib/src/trace.dart:40:35)
19 #5 format (file:///usr/local/google-old/home/goog/dart/dart/pkg/stack_t race/lib/stack_trace.dart:24:28)
20 #6 main.<anonymous closure> (file:///usr/local/google-old/home/goog/dar t/dart/test.dart:21:29)
21 #7 _CatchErrorFuture._sendError (dart:async:525:24)
22 #8 _FutureImpl._setErrorWithoutAsyncTrace (dart:async:393:26)
23 #9 _FutureImpl._setError (dart:async:378:31)
24 #10 _ThenFuture._sendValue (dart:async:490:16)
25 #11 _FutureImpl._handleValue.<anonymous closure> (dart:async:349:28)
26 #12 Timer.run.<anonymous closure> (dart:async:2402:21)
27 #13 Timer.Timer.<anonymous closure> (dart:async-patch:15:15)
28
29 and its human-readable representation:
30
31 dart:core-patch Object.noSuchMethod
32 pkg/stack_trace/lib/src/trace.dart 47:21 Trace.terse.<fn>
33 dart:collection IterableMixinWorkaround.reduce
34 dart:core-patch List.reduce
35 pkg/stack_trace/lib/src/trace.dart 40:35 Trace.terse
36 pkg/stack_trace/lib/stack_trace.dart 24:28 format
37 test.dart 21:29 main.<fn>
38 dart:async _CatchErrorFuture._sendError
39 dart:async _FutureImpl._setErrorWithoutAsyn cTrace
40 dart:async _FutureImpl._setError
41 dart:async _ThenFuture._sendValue
42 dart:async _FutureImpl._handleValue.<fn>
43 dart:async Timer.run.<fn>
44 dart:async-patch Timer.Timer.<fn>
45
46 You can further clean up the stack trace using `Trace.terse`. This folds
47 together multiple stack frames from the Dart core libraries, so that only the
48 core library method that was directly called from user code is visible. For
49 example:
50
51 dart:core Object.noSuchMethod
52 pkg/stack_trace/lib/src/trace.dart 47:21 Trace.terse.<fn>
53 dart:core List.reduce
54 pkg/stack_trace/lib/src/trace.dart 40:35 Trace.terse
55 pkg/stack_trace/lib/stack_trace.dart 24:28 format
56 test.dart 21:29 main.<fn>
57 dart:async Timer.Timer.<fn>
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | pkg/stack_trace/lib/src/frame.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698