watch_variable
Trace all writes to any C++ variable by evaluating its expression. Obtain a complete write history to understand value changes during execution.
Instructions
Get the complete write history of a C++ variable. Evaluates the expression to find its memory address, then traces all writes. Simpler than manually using evaluate + watchpoint_history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | C++ expression for the variable, e.g. "this->mURI" or "aLoadState" | |
| type | Yes | C++ type of the value, e.g. "uint64_t", "int32_t", "nsCOMPtr<nsIURI>" | |
| limit | No | Max results per direction (default 100) |