enableDebugMode static method
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.
Also attaches a method named leakFlagFactory
to the window which
consumers can call, with a String description as its sole argument, to
generate a disposable_common.LeakFlag object. This can be used to
generate a disposable_common.LeakFlag
and manually attach it to an object. For example, this may be useful in
code transpiled to JavaScript from another language.
Implementation
static void enableDebugMode({bool? disableLogging, bool? disableTelemetry}) {
disposable_common.Disposable.enableDebugMode(
disableLogging: disableLogging, disableTelemetry: disableTelemetry);
// Attach a leak flag factory function to the window to allow consumers to
// attach leak flags to arbitrary objects.
if (!js.context.hasProperty(leakFlagFactoryName)) {
js.context[leakFlagFactoryName] = _leakFlagFactory;
}
}