find_event_subscribers
Find all event subscription (+=) and unsubscription (-=) sites across the solution for any event symbol. Reports location, handler method, and subscription kind to audit memory leaks or inspect event subscribers.
Instructions
Find every += and -= site for an event symbol across the solution. Accepts source events (e.g. 'MyClass.Clicked') or metadata events (e.g. 'System.Diagnostics.Process.Exited'). Each result reports the source location, the resolved handler (method FQN, or a synthetic name like 'lambda at File.cs:N' for inline handlers), and the subscription kind (Subscribe for +=, Unsubscribe for -=). Use this for memory-leak audits (compare subscribe/unsubscribe pairs), UI event subscriber inspection, or when Grep over '+= EventName' would miss qualified or fully-typed subscription sites. Returns an envelope with items sorted by file path then line, totalCount, truncated, and limit (default 500).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of items to return (default: 500). Items are sorted by file path, then line. | |
| symbol | Yes | Event symbol (e.g. 'MyClass.Clicked' or 'System.Diagnostics.Process.Exited') |