---
updatedAt: 2025-06-05T01:06:53.000Z
agentTools:
  projectIndex: https://api.portal.xpertdoc.com/llms.txt
---

# How to debug

It is possible to add logging code to an add-in. Use code like the following to define and use a logger object:

```csharp
public IDictionary<string, string> GetItems(IContentMetadataFormDataProviderContext context)
{
  // ...
  
  var logger = this.AddInContext.CreateLogger("SomeLogger");
  logger.Debug("SomeLogger debug message.");
  
  // ...
}
```

The log messages are added to the LogEntry table in and can be reviewed via the Administration area in Portal.