streamListen method

Future<Success> streamListen(
  1. String streamId
)

The streamListen RPC subscribes to a stream in the VM. Once subscribed, the client will begin receiving events from the stream.

If the client is already subscribed to the stream, the 103 (Stream already subscribed) RPC error code is returned.

The streamId parameter may have the following published values:

streamId event types provided
VM VMUpdate, VMFlagUpdate
Isolate IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate,
IsolateReload, ServiceExtensionAdded
Debug PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted,
PauseException, PausePostRequest, Resume, BreakpointAdded,
BreakpointResolved, BreakpointRemoved, BreakpointUpdated, Inspect, None
Profiler CpuSamples, UserTagChanged
GC GC
Extension Extension
Timeline TimelineEvents, TimelineStreamsSubscriptionUpdate
Logging Logging
Service ServiceRegistered, ServiceUnregistered
HeapSnapshot HeapSnapshot

Additionally, some embedders provide the Stdout and Stderr streams. These streams allow the client to subscribe to writes to stdout and stderr.

streamId event types provided
Stdout WriteEvent
Stderr WriteEvent

It is considered a backwards compatible change to add a new type of event to an existing stream. Clients should be written to handle this gracefully, perhaps by warning and ignoring.

See Success.

Implementation

Future<Success> streamListen(String streamId) =>
    _call('streamListen', {'streamId': streamId});