current property

StackTrace current

Returns a representation of the current stack trace.

This is similar to what can be achieved by doing:

try { throw 0; } catch (_, stack) { return stack; }

The getter achieves this without throwing, except on platforms that have no other way to get a stack trace.

Implementation

external static StackTrace get current;