p-hatan/ mirror

pub repository

mirror.p-hatan.ir

stack_trace

0.7.5

A package for manipulating stack traces and printing them readably.

Download archive

Readme

This library provides the ability to parse, inspect, and manipulate stack traces produced by the underlying Dart implementation. It also provides functions to produce string representations of stack traces in a more readable format than the native StackTrace implementation.

Traces can be parsed from native StackTraces using Trace.from, or captured using Trace.current. Native StackTraces can also be directly converted to human-readable strings using Trace.format.

Here's an example native stack trace from debugging this library:

#0      Object.noSuchMethod (dart:core-patch:1884:25)
#1      Trace.terse.<anonymous closure> (file:///usr/local/google-old/home/goog/dart/dart/pkg/stack_trace/lib/src/trace.dart:47:21)
#2      IterableMixinWorkaround.reduce (dart:collection:29:29)
#3      List.reduce (dart:core-patch:1247:42)
#4      Trace.terse (file:///usr/local/google-old/home/goog/dart/dart/pkg/stack_trace/lib/src/trace.dart:40:35)
#5      format (file:///usr/local/google-old/home/goog/dart/dart/pkg/stack_trace/lib/stack_trace.dart:24:28)
#6      main.<anonymous closure> (file:///usr/local/google-old/home/goog/dart/dart/test.dart:21:29)
#7      _CatchErrorFuture._sendError (dart:async:525:24)
#8      _FutureImpl._setErrorWithoutAsyncTrace (dart:async:393:26)
#9      _FutureImpl._setError (dart:async:378:31)
#10     _ThenFuture._sendValue (dart:async:490:16)
#11     _FutureImpl._handleValue.<anonymous closure> (dart:async:349:28)
#12     Timer.run.<anonymous closure> (dart:async:2402:21)
#13     Timer.Timer.<anonymous closure> (dart:async-patch:15:15)

and its human-readable representation:

dart:core-patch                             Object.noSuchMethod
pkg/stack_trace/lib/src/trace.dart 47:21    Trace.terse.<fn>
dart:collection                             IterableMixinWorkaround.reduce
dart:core-patch                             List.reduce
pkg/stack_trace/lib/src/trace.dart 40:35    Trace.terse
pkg/stack_trace/lib/stack_trace.dart 24:28  format
test.dart 21:29                             main.<fn>
dart:async                                  _CatchErrorFuture._sendError
dart:async                                  _FutureImpl._setErrorWithoutAsyncTrace
dart:async                                  _FutureImpl._setError
dart:async                                  _ThenFuture._sendValue
dart:async                                  _FutureImpl._handleValue.<fn>
dart:async                                  Timer.run.<fn>
dart:async-patch                            Timer.Timer.<fn>

You can further clean up the stack trace using Trace.terse. This folds together multiple stack frames from the Dart core libraries, so that only the core library method that was directly called from user code is visible. For example:

dart:core                                   Object.noSuchMethod
pkg/stack_trace/lib/src/trace.dart 47:21    Trace.terse.<fn>
dart:core                                   List.reduce
pkg/stack_trace/lib/src/trace.dart 40:35    Trace.terse
pkg/stack_trace/lib/stack_trace.dart 24:28  format
test.dart 21:29                             main.<fn>
dart:async                                  Timer.Timer.<fn>
Changelog

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add stack_trace
pubspec.yaml
name: stack_trace
author: "Dart Team <misc@dartlang.org>"
homepage: http://www.dartlang.org
description: >
  A package for manipulating stack traces and printing them readably.

dependencies:
  path: any

dev_dependencies:
  unittest: any

version: 0.7.5
environment:
  sdk: ">=0.7.5"

Version history

VersionPublishedArchiveSHA-256
0.4.4+42013-04-03T17:57:07.850710ZDownloadd1714ce07ee54d0cb02b1e78dba7dc23092897c99aa513a2c27380455909f2bd
0.4.5+12013-04-08T23:13:54.614960ZDownload2f02727f7b909a2e1731e61670f7f8f5d4ecd46fb183780f0c1a96bbae8a918a
0.5.12013-04-29T18:54:33.978110ZDownload8737dcb987082383b14c2155d7cdf45e14245a56b607d5df8d93929ee8981366
0.5.42013-05-03T16:43:01.402460ZDownloadc8cc39f8b5d91b7bd7f848f4eebe686c731c44655ff3586c42e1d37684886a99
0.5.52013-05-06T19:20:02.211800ZDownload1a41440c96c2f7a5832087740a93cc5936e1f2bc3f570fbcb8013c5d73b1e7ab
0.5.62013-05-08T16:43:43.414600ZDownload6aad13a8ec6230422c3ffab8cd243ecb4ad5b6b39cb6b462d875bf8136edc0c9
0.5.72013-05-10T05:06:52.346470ZDownload340d5b611bec963f3dac3f69ea9a7d9b6524e104fb915edcfd88c162a6f04a25
0.5.92013-05-20T15:47:43.151160ZDownloadeca31f880f20cfaec178ba1995e6c0f9a0f80ea4cd883c08f064a61ba71ff542
0.5.11+12013-05-29T00:10:09.180310ZDownloadc8aa26be167c6ae03ac7f2dadc606ae085392bcae1cb460fce508fa1b699d91f
0.5.122013-05-29T18:32:24.830250ZDownload6acd28416bcfaef2c36f1016e03b16c1b69dfd130f6bedebbcb0aab79bcf41d7
0.5.132013-06-03T16:05:53.721430ZDownload10e22342361e34eec322568d529fe9c74ac6395c271a8bf5957a0ae4be340117
0.5.14+12013-06-05T15:05:50.367570ZDownload02f35299e9189a766b9ab73a0620c66f7e40f44688eccc9291c0dbb96797951b
0.5.14+32013-06-06T16:38:30.232070ZDownload22236333f57a38d0c5f5368804f0dd5a35ae1ddc08bd7dec165f36248623dbae
0.5.152013-06-07T23:01:20.217040ZDownloade4d1eeeac1e2c6d77a326411278b12d020cb77f8031641829653b2c46c53b7f3
0.5.162013-06-10T16:36:28.936970ZDownload6c988ef79b49065426de54f960fdf185928a52fe6da54a9f6298fa27f267d4de
0.5.172013-06-12T17:53:14.632130ZDownloadbbc1cbc71bd20f0fbe0e3946e7c4caf7dfc2f5eb66a0b9a5ee2c3363ecf7a0cd
0.5.202013-06-17T22:08:21.286060ZDownloada4fe2e4edcba7f7ca79dd90fbabb55c4628632ddb6b48997386ad35f8b2270bf
0.6.12013-06-27T19:34:23.188270ZDownload9ef62470448d5092e26399509e607a15fa9d73dd9b0817f1a64a1910458e2889
0.6.22013-06-28T20:57:02.403860ZDownload23bafc42f8383b3bfd68baee46d286fd35b4c2f0046d1f47d6f6e338e901bdb1
0.6.3+12013-07-09T00:24:52.320370ZDownload2cc09050fd7a33112c1911bdae9314bac99e655266b4f5a05389f75232cb38ce
0.6.52013-07-16T00:21:39.456330ZDownload43c5e9e2fbd60f6067b3cf73047020281e99af4ab9381d1bf061f7c83ecfe2a6
0.6.62013-07-17T19:43:52.135130ZDownload18bd0bbacd2e90eaee08591a9379b4c1da62ae7ea385728b8614bac3cdab1295
0.6.82013-07-19T20:56:29.461600ZDownload4441c460cb87affb20e3b1def273e5aaa76021942de174241d5fb38bb55f3237
0.6.92013-07-22T15:17:15.320120ZDownloadea6025fcc62f5feb4920e989b15837a9a3b0cc8ac1c6028136e64a28373cf7ae
0.6.9+22013-07-24T03:59:33.965340ZDownloade229375d70ed489d23a69d6c9f52586a078e8ae2f5c3573833425d0aefa5c858
0.6.112013-07-25T05:10:30.732150ZDownloadd9d70fa2d8aed29ae9ab5d41847a006835d14efef330729ff122316dbdfd3f87
0.6.122013-07-26T20:07:24.868670ZDownloadcbd17947c625961e8654a33d45b157be1876be00c9b1702915a28a599ce0026e
0.6.132013-07-30T21:56:59.100970ZDownload0cdb89715b3c31dc674923c8496fde8fbd8986a64be946fcd06966e73d66455c
0.6.142013-08-02T16:27:59.435360ZDownload1b49c9bd22dcb0af689363cb4d50d48074c8321307eb4c87ce7659be6de7b387
0.6.15+22013-08-05T22:50:43.565130ZDownloaddf43ddf8cf3d6029ca4214c41adace5f6fafd23f960d6a272850717419850e4c
0.6.15+32013-08-06T20:13:52.917490ZDownloadb2475b22f16f291571bf86fb11de876977fe3cce02e2b9e54d6d27cc4e2b92e5
0.6.172013-08-10T17:36:16.824470ZDownloadd19851fca89fc6fabee6f313d4c4e19e2198b7ea4cee011a8f7e54a3dbd04d1a
0.6.17+22013-08-12T22:22:51.678350ZDownloaddf9873105ef8d5310320282af5dd642ffd38188268b96f99ef4607e9f27753cb
0.6.192013-08-19T16:11:43.488270ZDownload01a33cfca1f257b8161efc4aa7a0618da65368f98d1c6e0a7b2471f2b16dec64
0.6.20+12013-08-22T18:20:16.141810ZDownloadab019773ad019dbc71f8f5e2cf7ef5152c5384aa5d4c4f864ec59cfb3051c4fc
0.6.21+32013-08-26T17:43:57.420310ZDownload7efe1802d685ac9cf7d409448f35971cb952eb22a9ef2b8457f9d5bf8a16dbba
0.7.02013-08-28T19:29:51.630520ZDownloade57f418be86a73384970c49c2b7322f33da313f5c90f09dc4334a8114a4ca321
0.7.12013-09-03T15:53:20.440900ZDownloaddd0c24e91c85761a15827c00c586dec220936e0687175951ae7ea67f7d5689e7
0.7.22013-09-06T15:52:19.871310ZDownload21171b318491321a9093db349fd9432360f0218574fcb7118c2ea6df487db4fb
0.7.2+12013-09-08T15:48:21.487310ZDownload0cb8da326eef24cbd2e89a035bc1018c9cf6e914bfb38001277fc32ffc3457e5
0.7.3+12013-09-16T15:45:21.303910ZDownload7e2ef41f382b9041aa10e7690ff872637e7bdbb1b6ff76df88b36d51b2bbdf90
0.7.42013-09-18T03:04:48.236620ZDownload115a40e969f666d2838f4662099aa20c74b33403fa3d51fac911fbe36033e56a
0.7.52013-09-21T00:43:22.693640ZDownloada0e74ded00711d3a4494fd9a48f183a7dea30771d521805e334f311119b1c0a1
0.7.62013-09-27T14:58:34.381560ZDownloadf334552fcfc0adcf24290bfff99a6234a465a7eba1593bad19229c1393c82bb4
0.7.6+42013-10-01T23:49:48.053290ZDownload769f7d53e2364a4c556ba5d7b23f51c3acf973939047cad55dfbcbe4ce349b8b
0.8.02013-10-03T16:28:54.686590ZDownload8616939ca021290085d07f99aebb6b3e8b60707058979bcc7f3cb5043541621e
0.8.12013-10-04T21:55:16.373730ZDownload750b9d6aa01a6843b1f0c6d9a8f5a2a41eb148558f01b337bd45768004954e1b
0.8.22013-10-14T21:40:55.564490ZDownload8c2f1b920a614bf2ac3f51643cf5ffce18d98ea49eb6cb5706b8b25e7389fb26
0.8.32013-10-17T16:01:29.858500ZDownloada025230dd147d94c154e89928c36916ee600b0cc42603367a4b01ce82c694899
0.8.42013-10-19T21:09:36.584320ZDownloadc61969eadab37e79ea250490343e75d307ca20765252e288cd6f38f6424c6afa
0.8.52013-10-21T15:53:04.175630ZDownload8411fb545f585f7739f5921222e3b8f469fda64e3d1aec072bc3ba82e7e2bd2d
0.8.62013-10-24T08:20:53.446790ZDownloadf606e03e4b1fa134502c2845499a81e5ee5db29959bee8c2d5fc74e9b902cc97
0.8.72013-10-28T14:34:29.861570ZDownload835a87c08b6db9b265edef174a8693d1915eeb485aed79d448e489549c9d7084
0.8.82013-10-30T03:30:15.015070ZDownload74e9661a20e0d90e941d0bb8df59b559f59e1d6b03b881639ccab76c64c99ad4
0.8.92013-10-31T15:16:44.399600ZDownload545d2e20844e0c7c4d170a9bbf57e4c21d77cc9be846d5e4a6cdadaa286e18a6
0.8.102013-11-01T19:23:57.179480ZDownload9cae6f27f8470a1cfac37c6334d5e3760e6f6bcf6fe358d2f274afed9b863032
0.8.10+32013-11-04T16:50:08.468610ZDownload82c97affba65e46a7661b1f90a57bd25d2125dab69b3f4c7da3589f16faaf61d
0.8.10+42013-11-05T16:06:47.568110ZDownloadd2834376fbe3893db92ef878cc4c3eb2ad82d08fc2ad39cf88ce4346852b38e5
0.9.02013-11-06T19:34:02.771210ZDownloada8dc1cbca2f1f2e208307d3d8a480ce60a4a02088962b5693b664484b6509d3c
0.9.12013-12-09T20:53:20.196830ZDownload746e050c7159927deeb9c757ebe7de8ac7598ddb082da8d948af7455ac7f627c
0.9.22014-02-26T00:56:19.047360ZDownloadb7b924f6edb77e0d0cf0071e99ae544de02b7bb3e34085bf92eb3e8c3aeb8944
0.9.32014-03-20T22:57:25.961230ZDownload6220f704b03ff5d05cb4c357fbe89033104c212df14d72a6a6e4a4b59f32cc2e
0.9.3+12014-04-09T23:50:13.427260ZDownloadc84b5ecfba9c31aab2f2e8c59a4a942d5830513d8d50b0720c66574dcf322066
0.9.3+22014-05-24T00:08:42.863570ZDownload907843bc7d6f00d71bb00f470a2a10ad55fd2b1c48e3295c4300c4230cac2a3f
1.0.02014-06-02T18:40:46.794840ZDownloadf5b1a7212e504288c77c69259ae4e4ffff0c6961426fcb1f417a44fc9a73f23a
1.0.12014-06-19T21:12:48.349160ZDownloadeab8bc1364178b7518e2e05e01c5b2e88f2770400db48008afe484e1a1c0a030
1.0.22014-06-26T22:44:29.801090ZDownload130361fdcdb9eddd99959699d2518770c1ca8f70010f09174cfdb1822372b0e7
1.0.32014-09-17T21:44:16.145040ZDownload313e87b5cd3a300c944d0551ad3c72a46f261ef8f6c0f5f384c9c278391fe63c
1.1.02014-09-25T21:36:15.890010ZDownload99355715bd8b63b041e39c57941f52425c963fdb29bf7eb105db642a7e9310b8
1.1.12014-09-26T00:42:20.228920ZDownload78f7af68edb43ff6fa6c8eb4599fa9da53ce2c771f0e7d8f4f45c59ce500f89f
1.1.22015-02-11T00:21:10.988650ZDownloadd404925cbc3ca618a747190041c7acc6ac17c18275461d2f991a7433ec157044
1.1.32015-02-12T20:00:18.978ZDownloadd318db8bd1b6ef7894debfff37decedf1aa2ae4701d405f560e806b154d99c01
1.2.02015-02-17T21:43:53.812580ZDownload405344aecd170fa4da0da6bde1cc09d8106d851e03a8c329608b6055ffc5fa53
1.2.12015-02-18T01:16:15.976590ZDownload0f7ed543863c0f2dec12316c33756da322d7229d2b5aae172d51dd88aab75f3c
1.2.22015-03-02T22:42:45.791440ZDownloadd99d9de5cbd0c1b2132f9265baa5a265ebac3e269ecc9b368e600e421e165062
1.2.32015-03-03T00:34:16.969400ZDownload91b49f6207ff7a85a9ad6d63ee1f1bc2c7511b870a1ad0546a51249c697b55e1
1.2.42015-03-09T19:56:08.989860ZDownloadc640b5ae8b564b0e6d3c3e2b5a90e52790ce16570bf587a3284e3c9645372ad3
1.3.02015-04-13T23:28:08.856870ZDownloadd18c897f558b2d2d863b07aa5743cccf7475c45eb7902d6765651e9dd38e1b1c
1.3.12015-04-14T00:20:51.237350ZDownload58dba09814a89752cbe45abdae1b63ccb39c8bf56211607c18f17b9854742128
1.3.22015-04-27T23:27:22.813110ZDownload8c4ecad8a8798f0797c748efd1bcab7689fd0cd7c89f9acee2b2d593e915be55
1.3.32015-06-09T20:02:31.937ZDownloadd642e41fd4441dfbd7b71051ab3e88b74e5ab1627261b286e772373bd84eac63
1.3.42015-06-29T23:29:15.267ZDownloadabe3fa0a92609decef8d4ebd311fa89461ea7d111b5f44368e71fdae5efa461b
1.4.02015-08-12T20:41:38.641ZDownload43a89209f0891b8b953187df7cd43eaa6e75f322069f8668c2ee69001699421b
1.4.12015-08-12T21:11:49.941ZDownload38cf40481ecf00b1a80d6427c9297c8685a61db007a898099ee226caaa66c323
1.4.22015-09-02T22:53:56.742ZDownload9f0ab071bd5a31a9cdd77766124320f6739f91b06d59ab94c0374dd4aca89908
1.5.02015-11-03T21:42:40.851ZDownload8d514a1791cd8e9922745846b19ea288d46840444cbfb159d7d5ccdd2f2e30f1
1.5.12016-01-11T22:24:40.081ZDownloadcac9b06e17f51238cae303afb93dd67c17f000f3edf14369fd76f24ca95a50ad
1.6.02016-01-12T23:48:15.987ZDownload758443ec86bc08034d5a5d7a6cf49fe57328e24fd13553c6210040b44d6c26ed
1.6.12016-02-01T22:22:06.594ZDownload2e9447c22373d1ed7223a0a45b3e43a61489cff948394da7a1b6f17ae0d7d814
1.6.22016-03-24T00:33:13.964ZDownloadf34e933e8423b0750509610b7578e2ed2fb0fb41f332ddc43448ef48fc95c673
1.6.32016-03-28T21:34:11.858ZDownload5e21fa1c4cc487eb060d11791c30e993534be6bf9a492d7f57464cc15dc1e521
1.6.42016-03-28T21:46:02.381ZDownloaddeffb57221ca6ab22fecefafeaf112778f9fc389cf608cf57efe020cab2cf09b
1.6.52016-04-08T00:26:33.942ZDownloada4f417a4b5a434dc9f064080dea6647a311cf9528feeee58e972055cbe779e73
1.6.62016-06-14T23:23:43.102ZDownload454fb72abadf03a44b864bf70a35f323e9d628b2db3d5acaaf8b913589eff026
1.6.72016-09-29T19:51:08.617ZDownload37ef8220ca3d5a1946c49607fecd88faba1c09e2a1b39c3799a1aa3413f544aa
1.6.82016-10-10T21:37:51.062ZDownloade97f5cefd3b55048df11dd42862db02928319aa262bca765fab4891f0657dff4
1.7.02016-11-16T00:47:41.207ZDownloadb8ea106aa932e2ba97fc29562caa76bd71c60f9d688ba03ca1466559f632af9d
1.7.12017-02-15T21:46:19.525ZDownload22288d24d7b0ee612949a34c9abe83c1857c5314cdae25192dadbcea0bc6ff19
1.7.22017-03-08T00:53:24.439ZDownloadf9c6ddae3271ece1c1f86347ed9753f9e039e2994bb49b6847ffe0ac65684730
1.7.32017-03-10T02:23:27.246ZDownloadce00ef66dc63abdc1a26f5d080c6033aa96953601f25f104f10c316373876101
1.7.42017-06-29T19:59:24.035457ZDownloadf277c55e31cb3bdc85f4a684c07dc4d5c7f611eafdb7c23424899866e7be90de
1.8.02017-07-10T20:58:34.601634ZDownload9c2b537efa494e22cbe15d5a0bdd8532cc3cc3d82da8a97aad29e2e5fd64ac49
1.8.12017-09-15T20:46:29.554816ZDownloadf9fffd77909b2570dbd5dcf17ab96e6b0e30e41d9fd0260296a4b1de79413268
1.8.22017-09-21T02:51:56.256495ZDownload8b7c8ee0ce07b17e5db1177166e151d2156100e27dd319a038eb45400740d969
1.8.32017-10-24T19:01:00.971777ZDownloadcb751159e48715fd6cfa2c9c484c8d25eda1973e27eeecdbe7cc22fb8dcb5376
1.9.02017-11-01T21:49:41.630073ZDownloadde208dddf8dde20203667e03407d0c86c6e0deb9ed6ec1d5879d13afc599520e
1.9.12017-11-08T23:32:31.879756ZDownload067871a41918bf7aeaf6906adb0d95597c8f975961812d66f023d08d0239be06
1.9.22018-02-14T20:34:18.568929ZDownload747b1d634d1a65e98917177b7bd1c3c5d4c8a6efb0a96cd14e11c90201b6f961
1.9.32018-07-19T18:56:54.701310ZDownload2c346a709ea61de60900290deac830c08503b636772d628d58c3183faeab51ce
1.9.52020-07-01T20:42:06.612181ZDownload9ed70af2f7c6c51dcc58f0c5336f88bf355064ce644a0af25dfee01a8ed1b61d
1.9.62020-11-05T22:15:49.955839ZDownload0d0e185a2fe720f67fefac3d3d88e4956c94bc3d7ef6003cb1916dc22883d881
1.10.0-nullsafety2020-07-29T17:41:42.887619ZDownloadf63c4eff6a419aa42a2ce2adb83cd5ff80c134f1e9ef0c398e647a3e1bb94178
1.10.0-nullsafety.12020-09-22T16:14:48.039176ZDownloadb32c296c1591d963b09eee49a5305710743a8934db83838c576d43ae3e463c68
1.10.0-nullsafety.22020-09-24T17:33:45.781310ZDownload85eacb9d1cd72b9181e9e3d14c08d9753497e4b43811b036f93780b473975c37
1.10.0-nullsafety.32020-10-13T19:59:26.671449ZDownloada44b117e1551aa989a57343ded0eb545e94f66d997253551fe4281475989526b
1.10.0-nullsafety.42020-10-14T18:36:13.021314ZDownload52644b2454ff99f24caae40412ff16354179b36ba46d25da9a46a57f49622033
1.10.0-nullsafety.52020-10-23T20:09:57.813662ZDownload019ca94c2b19c3d72edd0ebe128c4edcd2ada0b48c7d61cfdee623a77ca783c3
1.10.0-nullsafety.62020-11-04T20:34:21.101499ZDownloada098afe79375a5f8b7569e181e8026e48d285d6cf1b8a782762384e00a7a4e62
1.10.02021-02-02T23:18:54.306818ZDownloadf8d9f247e2f9f90e32d1495ff32dac7e4ae34ffa7194c5ff8fcc0fd0e52df774
1.11.02022-10-19T00:53:44.414476ZDownloadc3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
1.11.12023-07-07T08:23:50.467999ZDownload73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b
1.12.02024-09-27T17:14:25.196969ZDownload9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377
1.12.12024-12-20T13:31:01.144563ZDownload8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1
1.12.22026-08-28T20:42:47.771496ZDownload277654b3034d17ac6f9f1cb5595db011b1d5d41e8806866db28e0abaa101c490

Dependencies

path "any"