Integrations/.NET / C#

Set Up Bugsly for .NET / C#

Full error tracking for .NET applications — ASP.NET Core, console apps, background services, and game servers with automatic exception capture and AI analysis.

1. Install the SDK

dotnet add package Sentry.AspNetCore

2. Configure Bugsly

Add the following to your application entry point. Replace the DSN with your project DSN from the Bugsly dashboard.

using Sentry;

// ASP.NET Core: Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.WebHost.UseSentry(o =>
{
    o.Dsn = "https://your-dsn@bugsly.dev/1";
    o.TracesSampleRate = 1.0;
    o.Environment = builder.Environment.EnvironmentName;
});

// Console apps / game servers instead: call this once at startup
SentrySdk.Init(o =>
{
    o.Dsn = "https://your-dsn@bugsly.dev/1";
    o.TracesSampleRate = 1.0;
    o.AttachStacktrace = true;
});

3. Verify It Works

Trigger a test error in your application and check your Bugsly dashboard. The error should show up as an issue within a few seconds.

Want to check your DSN before touching any code? From a macOS, Linux or WSL terminal, this sends one real error without any SDK (replace your-dsn with the key from your DSN):

curl -sS -X POST "https://bugsly.dev/api/1/envelope/" \
  -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=your-dsn" \
  --data-binary $'{}\n{"type":"event"}\n{"level":"error","platform":"other","exception":{"values":[{"type":"CurlTestError","value":"Hello from my terminal"}]}}'

What You Get with .NET / C#

  • Automatic exception capture for ASP.NET Core middleware
  • Works with console apps, background services, and game servers
  • Full stack trace with decompiled source context
  • AI-powered analysis explains C# exceptions in plain English
  • NuGet package with zero-config setup for ASP.NET Core
  • Breadcrumbs for HTTP requests, database queries, and logs

Frequently Asked Questions

Does Bugsly work with .NET game servers?

Yes. Use the base Sentry NuGet package (dotnet add package Sentry) and call SentrySdk.Init() at startup. All unhandled exceptions are captured automatically, and you can add custom context like player IDs and game state.

What .NET versions are supported?

Bugsly supports .NET 6, 7, 8, and .NET Framework 4.6.2+. The SDK is compatible with any Sentry .NET client, so you get the same broad platform support.

Can I track background job errors?

Yes. Call SentrySdk.CaptureException(ex) in your job's catch block, or use the Sentry logging integration so that logged errors are reported. Initialize the SDK once at startup, not per job.

Start tracking errors in .NET / C# for free

The free plan includes 100 issues per month, 7-day retention and 10 AI requests per month. Paid plans start at $19/mo.

Start Free