Capture a .memgraph from a running process
captureMemgraphCapture a memory graph snapshot of a running Mac or iOS simulator process. Specify app name or PID to generate a .memgraph file for leak analysis.
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`. |