.NET Doctor

Diagnostic console for C# & .NET exceptions

DarkLight

Intake — describe the problem

Paste an exception message, stack trace, or the offending code. The more context you give, the sharper the diagnosis.

What .NET Doctor does

.NET Doctor is a free, in-browser tool for developers debugging C# and .NET applications. Paste an exception message, a stack trace, or a suspicious snippet of code, and it will identify the most likely root cause, explain it in plain English, show a tested fix with before-and-after code, and verify that the fix actually resolves the matched pattern. If nothing in its library matches, it says so directly and points you to Microsoft Learn, Stack Overflow, and the .NET runtime issue tracker instead of guessing.

Common C# exceptions this tool recognizes

NullReferenceException

The most common runtime error in C# — calling a member on a null reference.

Async void deadlocks

Blocking on async code with .Result or .Wait().

Collection modified during iteration

InvalidOperationException from mutating a list mid-foreach.

DbContext lifetime issues

Entity Framework Core objects used after disposal or across scopes.

Dependency injection lifetime mismatches

Captive dependencies between singleton and scoped services.

CORS failures in ASP.NET Core

Cross-origin requests blocked by missing or misordered middleware.

Frequently asked questions

How does .NET Doctor diagnose a C# error?

It matches your pasted text against a library of known C# and .NET failure signatures and returns the closest diagnosis, an explanation of the root cause, and a fix.

Does it actually compile or run my code?

No — everything runs client-side as pattern matching. It does not execute your code. For live execution, pair it with a sandbox such as dotnetfiddle.net.

What happens if there's no match?

It tells you plainly, rather than inventing an answer, and links to Microsoft Learn, Stack Overflow, and the dotnet/runtime GitHub issues so you can keep digging.

Is it free?

Yes, no sign-up required.