You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/debugger/get-started-debugging-multithreaded-apps.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Learn to debug multithreaded applications
3
3
description: Debug multithreaded applications by using the Parallel Stacks and Parallel Watch windows in the Visual Studio integrated development environment (IDE).
Copy file name to clipboardExpand all lines: docs/debugger/using-the-parallel-stacks-window.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "View threads in the Parallel Stacks window"
3
3
description: Use Parallel Stacks to help debug multithreaded applications. You can view stack information for all threads, and task-centered call stack information.
4
-
ms.date: "01/22/2025"
4
+
ms.date: "8/5/2025"
5
5
ms.topic: "conceptual"
6
6
f1_keywords:
7
7
- "vs.debug.parallelstacks"
@@ -24,8 +24,8 @@ The **Parallel Stacks** window is useful for debugging multithreaded application
24
24
-[Threads view](#threads-view) shows call stack information for all threads in the app. You can navigate between threads and stack frames on those threads.
-In native code, **Tasks** view shows call stacks of [task groups](/cpp/parallel/concrt/task-parallelism-concurrency-runtime), [parallel algorithms](/cpp/parallel/concrt/parallel-algorithms), [asynchronous agents](/cpp/parallel/concrt/asynchronous-agents), and [lightweight tasks](/cpp/parallel/concrt/task-scheduler-concurrency-runtime).
27
+
-For .NET apps using the async/await pattern, the Tasks view is the most helpful for debugging. For a step-by-step tutorial, see [Debug an async application](../debugger/walkthrough-debugging-a-parallel-application.md).
28
+
-For apps using the [Task Parallel Library (TPL)](/dotnet/standard/parallel-programming/task-parallel-library-tpl) but not the async/await pattern, or for C++ apps using the [Concurrency Runtime](/cpp/parallel/concrt/concurrency-runtime), the **Threads** view in the **Parallel Stacks** window is the most useful tool for debugging.
29
29
30
30
-[Method View](#method-view) pivots the call stack on a selected method.
Copy file name to clipboardExpand all lines: docs/debugger/using-the-tasks-window.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Use the Tasks Window to view concurrent operations
3
3
description: Tasks are asynchronous operations that can run concurrently. Multiple tasks can run on the same thread. Use Tasks to view task and WinJS.Promise object information.
The **Tasks** window resembles the **Threads** window, except that it shows information about <xref:System.Threading.Tasks.Task?displayProperty=fullName> or [task_handle](/cpp/parallel/concrt/reference/task-group-class) objects instead of each thread. Like threads, tasks represent asynchronous operations that can run concurrently; however, multiple tasks may run on the same thread.
23
23
24
-
In managed code, you can use the **Tasks** window when you work with <xref:System.Threading.Tasks.Task?displayProperty=fullName> objects or with the **await** and **async** keywords (**Await** and **Async** in VisualBasic). However, the **Tasks** view in the **Parallel Stacks** window is often more helpful for debugging. For more information, see [Debug an async application](../debugger/walkthrough-debugging-a-parallel-application.md).
25
-
26
-
For C/C++ code, you can use the **Tasks** window when you work with [task groups](/cpp/parallel/concrt/task-parallelism-concurrency-runtime), [parallel algorithms](/cpp/parallel/concrt/parallel-algorithms), [asynchronous agents](/cpp/parallel/concrt/asynchronous-agents), and [lightweight tasks](/cpp/parallel/concrt/task-scheduler-concurrency-runtime). For more information about tasks in native code, see [Concurrency Runtime](/cpp/parallel/concrt/concurrency-runtime).
24
+
In .NET code, you can use the **Tasks** window when you work with apps using the async/await pattern (**Await** and **Async** in VisualBasic). However, the **Tasks** view in the **Parallel Stacks** window is often more helpful for debugging async applications. For more information, see [Debug an async application](../debugger/walkthrough-debugging-a-parallel-application.md).
27
25
28
26
> [!TIP]
29
-
> For C/C++ code, the **Threads** view in the **Parallel Stacks** window is typically the most helpful when you need to debug tasks. For more information, see [View threads and tasks in the Parallel Stacks window](../debugger/using-the-parallel-stacks-window.md).
27
+
> For C/C++ code, the **Threads** view in the **Parallel Stacks** window is typically the most helpful when you need to debug [task groups](/cpp/parallel/concrt/task-parallelism-concurrency-runtime), [parallel algorithms](/cpp/parallel/concrt/parallel-algorithms), [asynchronous agents](/cpp/parallel/concrt/asynchronous-agents), and [lightweight tasks](/cpp/parallel/concrt/task-scheduler-concurrency-runtime). For more information, see [View threads and tasks in the Parallel Stacks window](../debugger/using-the-parallel-stacks-window.md).
30
28
31
29
You can use the **Tasks** window whenever you break into the debugger. You can access it on the **Debug** menu by clicking **Windows** and then clicking **Tasks**. The following illustration shows the **Tasks** window in its default mode.
32
30
@@ -49,7 +47,7 @@ The columns in the **Tasks** window show the following information.
49
47
|**Flags**|Shows which tasks are flagged and lets you flag or unflag a task.|
50
48
|**Icons**| A yellow arrow indicates the current task. The current task is the top-most task on the current thread.<br /><br />  A green arrow indicates the current debugger context (following a switch to task in the debugger).<br /><br /> A white arrow indicates the breaking task, that is, the one that was current when the debugger was invoked.<br /><br />  The pause icon indicates a task that has been frozen by the user. You can freeze and unfreeze a task by right-clicking it in the list.|
51
49
|**ID**|A system-provided number for the task. In native code, this is the address of the task.|
52
-
|**Status**|The current state (scheduled, active, blocked, deadlocked, awaiting, or completed) of the task. <br /><br /> Scheduled. A scheduled task is one that has not yet been run and, therefore, doesn't yet have a call stack, assigned thread, or related information.<br /><br />  Active. An active task is one that was executing code before breaking in the debugger.<br /><br />  Blocked. A blocked task is one that is blocked because it's waiting on an event to be signaled, a lock to be released, or another task to finish.<br /><br />  Awaiting. A non-blocking, waiting task that uses the async/await pattern.<br /><br />  Deadlocked. A deadlocked task is a waiting task whose thread is deadlocked with another thread.<br /><br /> Hover over the **Status** cell for a deadlocked or awaiting task to see more information about the block. **Warning:** The **Tasks** window reports deadlock only for a blocked task that uses a synchronization primitive that is supported by Wait Chain Traversal (WCT). For example, for a deadlocked <xref:System.Threading.Tasks.Task> object, which uses WCT, the debugger reports **Awaiting-deadlocked**. For a deadlocked task that is managed by the Concurrency Runtime, which doesn't use WCT, the debugger reports **Waiting**. For more information about WCT, see [Wait Chain Traversal](/windows/desktop/Debug/wait-chain-traversal).|
50
+
|**Status**|The current state (scheduled, active, blocked, deadlocked, awaiting, or completed) of the task. <br /><br /> Scheduled. A scheduled task is one that has not yet been run and, therefore, doesn't yet have a call stack, assigned thread, or related information.<br /><br />  Active. An active task is one that was executing code before breaking in the debugger.<br /><br />  Blocked. A blocked task is one that is blocked because it's waiting on an event to be signaled, a lock to be released, or another task to finish.<br /><br />  Awaiting. A non-blocking, waiting task that uses the async/await pattern.<br /><br />  Deadlocked. The deadlock symbol refers to a waiting task whose associated thread is deadlocked with another thread.<br /><br /> Hover over the **Status** cell to see more information about the block. **Warning:** The **Tasks** window reports deadlock only for a blocked task that uses a synchronization primitive that is supported by Wait Chain Traversal (WCT). For example, for a deadlocked <xref:System.Threading.Tasks.Task> object, which uses WCT, the debugger reports **Awaiting-deadlocked**. For a deadlocked task that is managed by the Concurrency Runtime, which doesn't use WCT, the debugger reports **Waiting**. For more information about WCT, see [Wait Chain Traversal](/windows/desktop/Debug/wait-chain-traversal).|
53
51
|**Start Time**|The time at which the task became active.|
54
52
|**Duration**|The number of seconds that the task has been active.|
55
53
|**Completion Time**|The time at which the task completed.|
Copy file name to clipboardExpand all lines: docs/debugger/walkthrough-debugging-a-multithreaded-application.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: View threads in the debugger
3
3
description: Explore the Threads window in the Visual Studio debugger. Group, sort, flag, freeze, thaw, and search for threads. Display call stacks in C#, Visual Basic, and C++.
4
-
ms.date: 12/17/2024
4
+
ms.date: 8/5/2025
5
5
ms.topic: concept-article
6
6
f1_keywords:
7
7
- "vs.debug.threads"
@@ -32,7 +32,7 @@ The **Threads** window in the Visual Studio debugger lets you examine and work w
32
32
33
33
The **Threads** window is available only while the Visual Studio debugger is running. During a debugging session, you can open the window by selecting **Debug** > **Windows** > **Threads**.
34
34
35
-
This article describes how to work with the **Threads** window for your C#, Visual Basic, or C++ programs. If you're looking for step-by-step guidance on how to debug multithreaded apps, see [Get started debugging multithreaded applications](./get-started-debugging-multithreaded-apps.md) and [Debug a deadlock using the Threads view](./how-to-use-the-threads-window.md).
35
+
This article describes how to work with the **Threads** window for your C#, Visual Basic, or C++ programs. However, the **Threads** view in the Parallel Stacks window is often more helpful for debugging. For more information, see [Debug a deadlock using the Threads view](./how-to-use-the-threads-window.md) and [View threads and tasks in the Parallel Stacks window](../debugger/using-the-parallel-stacks-window.md).
Copy file name to clipboardExpand all lines: docs/debugger/walkthrough-debugging-a-parallel-application.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,7 @@ Here are a few important points to remember when interpreting data in the Tasks
72
72
73
73
If the start window isn't open, choose **File** > **Start Window**.
74
74
75
-
::: moniker range=">=vs-2022"
76
75
On the start window, choose **New project**.
77
-
::: moniker-end
78
76
79
77
On the **Create a new project** window, enter or type *console* in the search box. Next, choose **C#** from the Language list, and then choose **Windows** from the Platform list.
0 commit comments