# OrleansDebuggerHelper.GetGrainInstance(object?)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.utilities.orleansdebuggerhelper/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.utilities.orleansdebuggerhelper/methods/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Runtime/Utilities/OrleansDebuggerHelper.cs#L24-L33)

```csharp
public static object? GetGrainInstance(object? grainReference)
```

Returns the grain instance corresponding to the provided `grainReference` if it is activated on current silo.

### Parameters

- `grainReference` (`object?`): The grain reference.

### Returns

The grain instance corresponding to the provided `grainReference` if it is activated on current silo, or `null` otherwise.
