Application Insights, structured logging, SQL query plans, ILogger, BenchmarkDotNet, pagination vs full-table fetch, memory dumps
Production bugs and performance problems are different from development bugs.
You cannot attach a debugger. You have limited visibility. The system is under real load. And in many cases, the issue is not an exception — it's slow code, a memory leak, or a database query that works fine with 100 rows but falls apart with 4 million.
Part 1: Debugging Production Issues
Structured Logging — Your First Line of Defence
Production debugging starts and ends with good logs.
// ❌ Bad — unstructured, unsearchable _logger . LogInformation ( "User " + userId + " placed order " + orderId );
// ✅ Good — structured, queryable _logger .…