socketProfilingEnabled method

Future<SocketProfilingState> socketProfilingEnabled(
  1. String isolateId,
  2. [bool? enabled]

The socketProfilingEnabled RPC is used to enable/disable the socket profiler and query its current state. If enabled is provided, the profiler state will be updated to reflect the value of enabled.

If the state of the socket profiler is changed, a SocketProfilingStateChange event will be sent on the Extension stream.


Future<SocketProfilingState> socketProfilingEnabled(String isolateId,
    [bool? enabled]) async {
  assert(await isSocketProfilingAvailable(isolateId));
  return _callHelper('', isolateId, args: {
    if (enabled != null) 'enabled': enabled,