📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

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.

Debugging Tools

Breakpoints, conditional breakpoints, Watch, Immediate, Call Stack, Threads and Memory windows, and the performance profiler.

  1. What is a breakpoint, and how do you step through .NET code with Step Into, Step Over and Step Out?

    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.

    Beginner Theory Debugging Tools Β· πŸ”— 2 follow-ups
  2. What are conditional breakpoints, hit counts, filters, tracepoints and data breakpoints, and when do you use each?

    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.

    Junior Theory Debugging Tools Β· πŸ”— 2 follow-ups
  3. How do you use the Watch, Locals, Autos and Immediate windows to inspect and change state while debugging, and what are the risks of evaluating expressions?

    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.

    Intermediate Theory Debugging Tools Β· πŸ”— 2 follow-ups
  4. What does the Call Stack window show, how do you use it to work out how code reached a point, and how does it handle async code?

    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).

    Intermediate Theory Debugging Tools Β· πŸ”— 2 follow-ups
  5. A .NET service hangs under load. How do you find a deadlock using the Threads window and Parallel Stacks?

    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.

    Mid-Level Debugging Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  6. What is the debugger's Memory window, when is it useful in .NET, and how is it different from memory profiling tools?

    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.

    Mid-Level Theory Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  7. An API endpoint is slow. How do you use the Visual Studio Performance Profiler, dotnet-counters and dotnet-trace to find and fix the cause?

    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.

    Senior RealWorldScenario Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  8. What are Just My Code, symbols (PDB files) and Source Link, and how do you step into framework or NuGet package code?

    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.

    Junior Theory Debugging Tools Β· πŸ”— 2 follow-ups
  9. A problem only happens in production and you cannot attach a debugger. How do you capture and analyse a memory dump of a .NET process?

    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.

    Senior Debugging Debugging Tools Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  10. Review this class's debugging attributes. How do DebuggerDisplay, DebuggerBrowsable, DebuggerTypeProxy and DebuggerStepThrough help, and what would you change?

    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.

    Intermediate CodeReview Debugging Tools Β· πŸ”— 2 follow-ups

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me