Google is committed to advancing racial equity for Black communities. See how.

Inspect.named constructor

Inspect.named(String name)

Returns a new Inspect object at .inspect If called multiple times with the same name within a process, a unique number will be appended, though any existing file will be overwritten.

Example: Inspect.named('test'); Inspect.named('test'); Results in "test.inspect" and "test_2.inspect"

Implementation

factory Inspect.named(String name) {
  var context = StartupContext.fromStartupInfo();
  var writer = VmoWriter.withSize(vmoSize);
  var fileName = _nextInstanceWithName(name);
  return InspectImpl(context.outgoing.diagnosticsDir(), fileName, writer);
}