377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
Breakpoints, conditional breakpoints, Watch, Immediate, Call Stack, Threads and Memory windows, and the performance profiler.
The basics of interactive debugging in Visual Studio, VS Code and Rider: setting breakpoints, stepping commands, Run to Cursor and Set Next Statement, and why Debug builds and symbols matter.
Advanced breakpoint types in Visual Studio, VS Code and Rider: conditions, hit counts, filters, tracepoints/logpoints, function, dependent, temporary and data breakpoints, with their performance cost.
Inspecting and changing state at a breakpoint with Locals, Autos, Watch, QuickWatch, DataTips and the Immediate window (Debug Console in VS Code), format specifiers, Object IDs, and the side effects of function evaluation.
Reading the debugger's Call Stack: frames, switching context, Just My Code and external code, async logical stacks and Parallel Stacks, inlining, and exception stack traces (throw vs throw ex).
Diagnosing a deadlock with Break All, the Threads window, Parallel Stacks and Parallel Watch, then confirming it in production with dotnet-dump, and fixing it with consistent lock ordering or async-friendly design.
Using the Visual Studio Memory window to read raw bytes for buffers, interop structs, encodings and unsafe code, and contrasting it with heap snapshots, allocation tracking and dotnet-gcdump for memory leaks.
A measured approach to a slow ASP.NET Core endpoint: confirming with Application Insights, profiling CPU, allocations, database and async behaviour in the Visual Studio Performance Profiler, and dotnet-counters and dotnet-trace in production.
How the debugger finds source for code you did not write: portable PDBs, symbol servers and .snupkg packages, Just My Code, Source Link and embedded sources, with settings for Visual Studio, VS Code and Rider.
Production diagnosis with dumps: when to take one, capturing with dotnet-dump, createdump settings, App Service and Kubernetes options, analysing in dotnet-dump or Visual Studio, and handling dumps as sensitive data.
A code review of debugger customisation in C#: cheap, side-effect-free DebuggerDisplay, hiding noise with DebuggerBrowsable, collection proxies, step-through attributes, and removing leftover Debugger calls and personal data from debug views.