For a small example like
import 'dart:async';
import 'package:stack_trace/stack_trace.dart';
void main() {
scheduleAsync();
}
void scheduleAsync() {
new Future.delayed(new Duration(seconds: 1))
.then((_) => runAsync());
}
void runAsync() {
throw 'oh no!';
}
I get this stack trace. The furthest I can trace the call back is the runAsync()
call in scheduleAsync()
.
There is no information left, that scheduleAsync
was called from main
.
Unhandled exception: Uncaught Error: oh no! Stack Trace: #0 runAsync (file:///home/myuser/dart/playground/bin/stack_trace/main.dart:14:3) #1 scheduleAsync. (file:///home/myuser/dart/playground/bin/stack_trace/main.dart:10:28) #2 _RootZone.runUnary (dart:async/zone.dart:1155) #3 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:484) #4 _Future._propagateToListeners (dart:async/future_impl.dart:567) #5 _Future._complete (dart:async/future_impl.dart:348) #6 Future.Future.delayed. (dart:async/future.dart:228) #7 Timer._createTimer. (dart:async-patch/timer_patch.dart:16) #8 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385) #9 _handleMessage (dart:isolate-patch/timer_impl.dart:411) #10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:142) #0 _rootHandleUncaughtError. (dart:async/zone.dart:886) #1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41) #2 _asyncRunCallback (dart:async/schedule_microtask.dart:48) #3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96) #4 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:392) #5 _handleMessage (dart:isolate-patch/timer_impl.dart:411) #6 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:142) Process finished with exit code 255
Is there a way to get the full stack trace?