Skip to content

Commit aa475a5

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/visualstudio-docs-pr (branch live)
2 parents fe2e048 + 5c1a417 commit aa475a5

14 files changed

+74
-498
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,11 @@
23352335
"redirect_url": "/visualstudio/ide/how-to-configure-projects-to-target-platforms",
23362336
"redirect_document_id": false
23372337
},
2338+
{
2339+
"source_path": "docs/debugger/debug-parallel-application.md",
2340+
"redirect_url": "/visualstudio/debugger/get-started-debugging-multithreaded-apps",
2341+
"redirect_document_id": true
2342+
},
23382343
{
23392344
"source_path": "docs/debugger/walkthrough-debugging-a-windows-form.md",
23402345
"redirect_url": "/visualstudio/debugger/debugger-feature-tour",

docs/debugger/debug-multithreaded-applications-in-visual-studio.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Debug multithreaded applications"
33
description: Debug multithreaded applications in Visual Studio and review tools and other articles about debugging multithreaded apps.
4-
ms.date: "05/06/2024"
4+
ms.date: "8/5/2025"
55
ms.topic: "conceptual"
66
f1_keywords:
77
- "vs.debug.gputthreads"
@@ -41,9 +41,17 @@ The existence of multiple processes enables a computer to perform more than one
4141

4242
Visual Studio provides different tools for use in debugging multithreaded apps.
4343

44-
- For threads, the primary tools for debugging threads are the **Threads** window, thread markers in source windows, the **Parallel Stacks** window, the **Parallel Watch** window, and the **Debug Location** toolbar. To learn about the **Threads** window and **Debug Location** toolbar, see [Walkthrough: Debug using the Threads window](../debugger/how-to-use-the-threads-window.md). To learn how to use the **Parallel Stacks** and **Parallel Watch** windows, see [Get started debugging a multithreaded application](../debugger/get-started-debugging-multithreaded-apps.md). Both topics show how to use thread markers.
44+
::: moniker range=">= vs-2022"
45+
- For threads, the primary tools for debugging threads are the **Parallel Stacks** window, the **Parallel Watch** window, thread markers in source windows, the **Threads** window, and the **Debug Location** toolbar. To learn about the **Threads** view in **Parallel Stacks**, see [Debug a deadlock using Threads view](../debugger/how-to-use-the-threads-window.md). To learn how to use the **Parallel Stacks** and **Parallel Watch** windows, see [Get started debugging a multithreaded application](../debugger/get-started-debugging-multithreaded-apps.md). The get started article shows how to use thread markers. Also, see [Walkthrough: Debugging a C++ AMP application](/cpp/parallel/amp/walkthrough-debugging-a-cpp-amp-application).
4546

46-
- For code that uses the [Task Parallel Library (TPL)](/dotnet/standard/parallel-programming/task-parallel-library-tpl) or the [Concurrency Runtime](/cpp/parallel/concrt/concurrency-runtime/), the primary tools for debugging are the **Parallel Stacks** window, the **Parallel Watch** window, and the **Tasks** window, which also supports JavaScript. To get started, see [Walkthrough: Debugging a parallel application](../debugger/walkthrough-debugging-a-parallel-application.md) and [Walkthrough: Debugging a C++ AMP application](/cpp/parallel/amp/walkthrough-debugging-a-cpp-amp-application).
47+
- For .NET code that uses async, the primary tools for debugging are **Tasks** view in the **Parallel Stacks** window. To get started, see [Debug an async application (.NET)](../debugger/walkthrough-debugging-a-parallel-application.md).
48+
::: moniker-end
49+
50+
::: moniker range="vs-2019"
51+
- For threads, the primary tools for debugging threads are the **Parallel Stacks** window, the **Parallel Watch** window, thread markers in source windows, the **Threads** window, and the **Debug Location** toolbar. To learn about the **Threads** view in **Parallel Stacks**, see [View threads and tasks in the Parallel Stacks window](../debugger/using-the-parallel-stacks-window.md). To learn how to use the **Parallel Stacks** and **Parallel Watch** windows, see [Get started debugging a multithreaded application](../debugger/get-started-debugging-multithreaded-apps.md). The get started article shows how to use thread markers. Also, see [Walkthrough: Debugging a C++ AMP application](/cpp/parallel/amp/walkthrough-debugging-a-cpp-amp-application).
52+
53+
- For .NET code that uses async, the primary tools for debugging are **Tasks** view in the **Parallel Stacks** window. For more information, see [View threads and tasks in the Parallel Stacks window](../debugger/using-the-parallel-stacks-window.md).
54+
::: moniker-end
4755

4856
- For debugging threads on the GPU, the primary tool is the **GPU Threads** window. See [How to: Use the GPU Threads window](../debugger/how-to-use-the-gpu-threads-window.md).
4957

@@ -59,11 +67,11 @@ Debugging a multithreaded application that has a user interface can be especiall
5967
|--------------------|---------------------------|-----------------------------|
6068
|**Attach to Process** dialog box|Available Processes you can attach to:<br /><br /> - Process name (.exe)<br />- Process ID number<br />- Menubar Title<br />- Type (Managed v4.0; Managed v2.0, v1.1, v1.0; x86; x64; IA64)<br />- User Name (account name)<br />- Session number|Select a process to attach to<br /><br /> Select a remote computer<br /><br /> Change transport type for connecting to remote computers|
6169
|**Processes** window|Attached Processes:<br /><br /> - Process Name<br />- Process ID number<br />- Path to process .exe<br />- Menubar Title<br />- State (Break. Running)<br />- Debugging (Native, Managed, and so on.)<br />- Transport type (default, native with no authentication)<br />- Transport Qualifier (remote computer)|Tools:<br /><br /> - Attach<br />- Detach<br />- Terminate<br /><br /> Shortcut menu:<br /><br /> - Attach<br />- Detach<br />- Detach when debugging stopped<br />- Terminate|
62-
|**Threads** window|Threads in current process:<br /><br /> - Thread ID<br />- Managed ID<br />- Category (main thread, interface thread, remote procedure call handler, or worker thread)<br />- Thread Name<br />- Location where thread is created<br />- Priority<br />- Affinity Mask<br />- Suspended Count<br />- Process Name<br />- Flag Indicator<br />- Suspended indicator|Tools:<br /><br /> - Search<br />- Search Call Stack<br />- Flag Just My Code<br />- Flag Custom Module Selection<br />- Group by<br />- Columns<br />- Expand/Collapse callstacks<br />- Expand/Collapse groups<br />- Freeze/Thaw Threads<br /><br /> Shortcut menu:<br /><br /> - Show threads in source<br />- Switch to a thread<br />- Freeze a running thread<br />- Thaw a frozen thread<br />- Flag a thread for additional study<br />- Unflag a thread<br />- Rename a thread<br />- Show and hide threads<br /><br /> Other actions:<br /><br /> - View the call stack for a thread in a DataTip|
63-
|Source window|Thread indicators in left gutter indicate single or multiple threads (off by default, turned on by using shortcut menu in **Threads** window)|Shortcut menu:<br /><br /> - Switch to a thread<br />- Flag a thread for additional study<br />- Unflag a thread|
6470
|**Debug Location** toolbar|- Current process<br />- Suspend the application<br />- Resume the application<br />- Suspend and shut down the application<br />- Current thread<br />- Toggle current thread flag state<br />- Show only flagged threads<br />- Show only current process<br />- Current stack frame|- Switch to another process<br />- Suspend, resume, or shut down the application<br />- Switch to another thread in current process<br />- Switch to another stack frame in current thread<br />- Flag or unflag current threads<br />- Show only flagged threads<br />- Show only the current process|
6571
|**Parallel Stacks** window|- Call stacks for multiple threads in one window.<br />- Active stack frame for each thread.<br />- Callers and callees for any method. <br/>- Deadlock Detection <br />|- Filter out specified threads <br />- Filter out external code stacks<br />- Switch to Tasks view<br />- Flag or unflag a thread<br />- Zoom <br />- Copy Stack Frames <br />- Save/Export all stacks as image |
6672
|**Parallel Watch** window|- The flag column, in which you can mark a thread that you want to pay special attention to.<br />- The frame column, in which an arrow indicates the selected frame.<br />- A configurable column that can display the machine, process, tile, task, and thread.|- Flag or unflag a thread<br />- Display only flagged threads<br />- Switch frames<br />- Sort a column<br />- Group threads<br />- Freeze or thaw threads<br />- export the data in the Parallel Watch window|
73+
|**Threads** window|Threads in current process:<br /><br /> - Thread ID<br />- Managed ID<br />- Category (main thread, interface thread, remote procedure call handler, or worker thread)<br />- Thread Name<br />- Location where thread is created<br />- Priority<br />- Affinity Mask<br />- Suspended Count<br />- Process Name<br />- Flag Indicator<br />- Suspended indicator|Tools:<br /><br /> - Search<br />- Search Call Stack<br />- Flag Just My Code<br />- Flag Custom Module Selection<br />- Group by<br />- Columns<br />- Expand/Collapse callstacks<br />- Expand/Collapse groups<br />- Freeze/Thaw Threads<br /><br /> Shortcut menu:<br /><br /> - Show threads in source<br />- Switch to a thread<br />- Freeze a running thread<br />- Thaw a frozen thread<br />- Flag a thread for additional study<br />- Unflag a thread<br />- Rename a thread<br />- Show and hide threads<br /><br /> Other actions:<br /><br /> - View the call stack for a thread in a DataTip|
74+
|Source window|Thread indicators in left gutter indicate single or multiple threads (off by default, turned on by using shortcut menu in **Threads** window)|Shortcut menu:<br /><br /> - Switch to a thread<br />- Flag a thread for additional study<br />- Unflag a thread|
6775
|**Tasks** window|- View information about <xref:System.Threading.Tasks.Task> objects including task ID, task status (scheduled, running, waiting, deadlocked), and which thread is assigned to the task.<br />- Current location in call stack.<br />- Delegate passed to the task at creation time|- Switch to current task<br />- Flag or unflag a task<br />- Freeze or thaw a task|
6876
|**GPU Threads** window|- The flag column, in which you can mark a thread that you want to pay special attention to.<br />- The current thread column, in which a yellow arrow indicates the current thread.<br />- The **Thread Count** column, which displays the number of threads at the same location.<br />- The **Line** column, which displays the line of code where each group of threads is located.<br />- The **Address** column, which displays the instruction address where each group of threads is located.<br />- The **Location** column, which is the location in the code of the address.<br />- The **Status** column, which shows whether the thread is active or blocked.<br />- The **Tile** column, which shows the tile index for the threads in the row.|- Change to a different thread<br />- Display a particular tile and thread<br />- Display or hide a column<br />- Sort by a column<br />- Group threads<br />- Freeze or thaw threads<br />- Flag or unflag a thread<br />- Display only flagged threads|
6977

0 commit comments

Comments
 (0)