enableDebugMode static method

void enableDebugMode({
  1. bool? disableLogging,
  2. bool? disableTelemetry,
})

Causes messages to be logged for various lifecycle and management events.

This should only be used for debugging and profiling as it can result in a huge number of messages being generated.

Implementation

static void enableDebugMode({bool? disableLogging, bool? disableTelemetry}) {
  if (!_debugMode) {
    _debugMode = true;
    _debugModeLogging = !(disableLogging ?? false);
    _debugModeTelemetry = !(disableTelemetry ?? false);
    if (_debugModeLogging) {
      _logger = Logger('w_common.Disposable');
    }
  }
}