Capture a .memgraph from a running process
captureMemgraphCapture a memory graph snapshot from a running process by specifying its PID or app name, writing a .memgraph file for analysis of local Mac and iOS simulator processes.
Instructions
[mg.memory] Wrapper around leaks --outputGraph. Resolves appName to a PID via pgrep -x (or accepts pid directly), then writes a .memgraph snapshot. Limitation: only works for processes running on the local Mac (Mac apps + iOS simulator). Does NOT work for physical iOS devices — use Xcode's Memory Graph button there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | PID of the running process. Mutually exclusive with `appName`. | |
| appName | No | App name (resolves to PID via `pgrep -x`). Mutually exclusive with `pid`. | |
| output | Yes | Absolute path where the `.memgraph` should be written. Must end in `.memgraph`. |