writeHeapSnapshotToFile static method

void writeHeapSnapshotToFile(
  1. String filepath
)

Writes a snapshot of the heap to filepath.

The filepath should be a native file path that can be opened for writing. Relative paths will be relative to the current working directory. If the file already exists it will be overwritten.

WARNING: Only works on a native runtime in certain configurations. An UnsupportedError error is thrown if this functionality is not available (e.g. in product mode, in non-standalone VM, ...)

NOTE: This is an experimental function. We reserve the right to change or remove it in the future.

Implementation

external static void writeHeapSnapshotToFile(String filepath);