Interact with developer tools such as the debugger and inspector.

The dart:developer library is unstable and its API might change slightly as a result of developer feedback. This library is platform dependent and therefore it has implementations for both dart2js and the Dart VM. Both are under development and may not support all operations yet.

Functions

debugger({bool when: true, String message}) → bool

If when is true, stop the program as if a breakpoint were hit at the following statement.

getCurrentTag() → UserTag

Returns the current UserTag for the isolate.

inspect(Object object) → Object

Send a reference to object to any attached debuggers.

log(String message, {DateTime time, int sequenceNumber, int level: 0, String name: '', Zone zone, Object error, StackTrace stackTrace}) → dynamic

Emit a log event. message is the log message. time is the timestamp. sequenceNumber is a monotonically increasing sequence number. level is the severity level (value between 0 and 2000). name is the name of the source of the log message. zone the zone where the log was emitted error an error object associated with this log event. stackTrace a stack trace associated with this log event.

Classes

Counter

A changing value. Initial value is 0.0.

Gauge

A measured value with a min and max. Initial value is min. Value will be clamped to the interval min, max.

Metric

Abstract Metric class. Metric names must be unique, are hierarchical, and use periods as separators. For example, 'a.b.c'. Uniqueness is only enforced when a Metric is registered. The name of a metric cannot contain the slash ('/') character.

Metrics

UserTag

A UserTag can be used to group samples in the Observatory profiler.