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.

// 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;
});

// Or for console apps / game servers:
using Sentry;

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. You should see the error appear within seconds, complete with stack trace, breadcrumbs, and AI-powered analysis.

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. Wrap your job execution in a SentrySdk.Init scope, and any exceptions thrown in background tasks are captured with full context. Works with Hangfire, Quartz.NET, and custom hosted services.

Start tracking errors in .NET / C# for free

Get AI-powered error analysis, session replay, and performance monitoring — included free on every plan.

Start Free