<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw" -->

---
title: Today I will… debug a production crash | daily.dev
description: A walkthrough of diagnosing a production hang in a C# application caused by thread-pool saturation, using a memory dump. It covers monitoring the ThreadPool...
canonical: https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Today I will… debug a production crash | daily.dev
og:description: A walkthrough of diagnosing a production hang in a C# application caused by thread-pool saturation, using a memory dump. It covers monitoring the ThreadPool...
og:url: https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw
og:image: https://api.daily.dev/og/posts/OIx9IKEDw.png
og:image:alt: Today I will… debug a production crash
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Today I will… debug a production crash

**[Visual Studio Blog](https://daily.dev/sources/vs)** · 6 min read · 11 upvotes · 1 comments

## Summary

A walkthrough of diagnosing a production hang in a C# application caused by thread-pool saturation, using a memory dump. It covers monitoring the ThreadPool for slow completions, triggering a dump when a timeout is exceeded, deliberately exhausting the pool with Parallel.For and Thread.Sleep calls, then opening the .dmp file in Visual Studio with Debug with Mixed. The Parallel Stacks window is used to visualize dozens of blocked threads, and GitHub Copilot's integration with that window is shown analyzing the stacks to conclude the issue is thread-pool saturation rather than a crash.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://devblogs.microsoft.com/visualstudio/today-i-will-debug-a-production-crash>

## Questions this post answers

### How can I diagnose a C# application that hangs in production due to thread pool exhaustion?

Capture a memory dump when a ThreadPool task takes longer than an expected threshold, then open the dump in Visual Studio using Debug with Mixed. Use the Parallel Stacks window (Debug > Windows > Parallel Stacks, Ctrl+Shift+D, S) to see all running threads grouped by their blocking location, revealing when far more threads are blocked than expected for the CPU core count.

_Developers chasing production hangs can find similar debugging walkthroughs curated on daily.dev._

### What does the Parallel Stacks window show when threads are blocked in a C# memory dump?

It groups threads by where they are currently paused, showing a box with a count like 27 Threads all blocked at the same call, such as a Thread.Sleep, alongside individual threads like the main thread and any custom monitoring thread. Hovering over the grouped box reveals the exact method where those threads are stuck, making thread pool saturation easy to spot.

_Track debugging techniques like this on daily.dev when hunting down concurrency bugs._

### Can GitHub Copilot help analyze a memory dump in Visual Studio's Parallel Stacks window?

Yes, a Copilot icon on the Parallel Stacks window starts a chat session with context from the current view and access to the memory dump, letting Copilot analyze thread states and stacks. In one case Copilot correctly identified a thread-pool saturation and blocking workload issue rather than an actual crash.

_daily.dev surfaces AI-assisted debugging workflows for developers evaluating Copilot in their toolchain._

## Community discussion

Top comments from developers on daily.dev.

**@nark3d** · 0 upvotes

> Wiring the capture to the failure condition rather than taking it when someone noticed the hang is the part worth stealing here.  Plenty of teams have the dump workflow written down and still lose the window, because by the time anyone opens a debugger the pool has drained and the state has moved on.  Wiring the capture to the failure condition means the evidence exists before the argument about whether it was a crash or saturation starts.  I like that Copilot reads the Parallel Stacks window for you.  How much of the conclusion do you trust before you go back and verify it yourself?

## Similar posts on daily.dev

- [Creating a memory dump in C\#](https://daily.dev/posts/creating-a-memory-dump-in-c--torykruun) · .NET Blog · 17 upvotes · 0 comments
- [ThreadPool Starvation in .NET: How Blocking Code Freezes Your API](https://daily.dev/posts/threadpool-starvation-in-net-how-blocking-code-freezes-your-api-wvrskgjxa) · C\# Corner · 0 upvotes · 0 comments
- [Threading on Thin Ice: Demystifying the .NET ThreadPool and avoiding starvation](https://daily.dev/posts/threading-on-thin-ice-demystifying-the-net-threadpool-and-avoiding-starvation-9n7wbor0j) · ITNEXT · 8 upvotes · 1 comments
- [Thread Dumps and Project Loom \(Virtual Threads\)](https://daily.dev/posts/thread-dumps-and-project-loom-virtual-threads--toxvuqohy) · JetBrains · 0 upvotes · 0 comments

---

Tags: [#github](https://daily.dev/tags/github), [#c#](https://daily.dev/tags/c#), [#visual-studio](https://daily.dev/tags/visual-studio)

[View this post on daily.dev](https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Today I will… debug a production crash","url":"https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw"},"datePublished":"2026-09-22T17:11:37.104Z","dateModified":"2026-09-22T17:11:58.894Z","description":"A walkthrough of diagnosing a production hang in a C# application caused by thread-pool saturation, using a memory dump. It covers monitoring the ThreadPool...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d7f0c21bccb48953e25a5f6733b14db5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d7f0c21bccb48953e25a5f6733b14db5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Visual Studio Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Visual Studio Blog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/03971923d4044f74ac177dc752e1e752","url":"https://daily.dev/sources/vs"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":11},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"github,c#,visual-studio","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Visual Studio Blog","item":"https://daily.dev/sources/vs"},{"@type":"ListItem","position":3,"name":"Today I will… debug a production crash"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw","comment":[{"@type":"Comment","text":"Wiring the capture to the failure condition rather than taking it when someone noticed the hang is the part worth stealing here.  Plenty of teams have the dump workflow written down and still lose the window, because by the time anyone opens a debugger the pool has drained and the state has moved on.  Wiring the capture to the failure condition means the evidence exists before the argument about whether it was a crash or saturation starts.  I like that Copilot reads the Parallel Stacks window for you.  How much of the conclusion do you trust before you go back and verify it yourself?","datePublished":"2026-09-28T16:33:28.885Z","url":"https://daily.dev/posts/OIx9IKEDw#c-ZbNZy362B","author":{"@type":"Person","name":"Adam","url":"https://daily.dev/nark3d","image":"https://avatars.githubusercontent.com/u/2162621?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/today-i-will-debug-a-production-crash-oix9ikedw#faq","mainEntity":[{"@type":"Question","name":"How can I diagnose a C# application that hangs in production due to thread pool exhaustion?","acceptedAnswer":{"@type":"Answer","text":"Capture a memory dump when a ThreadPool task takes longer than an expected threshold, then open the dump in Visual Studio using Debug with Mixed. Use the Parallel Stacks window (Debug \u003e Windows \u003e Parallel Stacks, Ctrl+Shift+D, S) to see all running threads grouped by their blocking location, revealing when far more threads are blocked than expected for the CPU core count. Developers chasing production hangs can find similar debugging walkthroughs curated on daily.dev."}},{"@type":"Question","name":"What does the Parallel Stacks window show when threads are blocked in a C# memory dump?","acceptedAnswer":{"@type":"Answer","text":"It groups threads by where they are currently paused, showing a box with a count like 27 Threads all blocked at the same call, such as a Thread.Sleep, alongside individual threads like the main thread and any custom monitoring thread. Hovering over the grouped box reveals the exact method where those threads are stuck, making thread pool saturation easy to spot. Track debugging techniques like this on daily.dev when hunting down concurrency bugs."}},{"@type":"Question","name":"Can GitHub Copilot help analyze a memory dump in Visual Studio's Parallel Stacks window?","acceptedAnswer":{"@type":"Answer","text":"Yes, a Copilot icon on the Parallel Stacks window starts a chat session with context from the current view and access to the memory dump, letting Copilot analyze thread states and stacks. In one case Copilot correctly identified a thread-pool saturation and blocking workload issue rather than an actual crash. daily.dev surfaces AI-assisted debugging workflows for developers evaluating Copilot in their toolchain."}}]}
```

