| title | Viewing GPU Threads in the Debugger | ||||
|---|---|---|---|---|---|
| description | Use the GPU Threads window to examine and work with threads that are running on the GPU in the application that you are debugging in Visual Studio. | ||||
| ms.date | 11/04/2016 | ||||
| ms.topic | how-to | ||||
| f1_keywords |
|
||||
| dev_langs |
|
||||
| helpviewer_keywords |
|
||||
| author | mikejo5000 | ||||
| ms.author | mikejo | ||||
| ms.subservice | debug-diagnostics |
In the GPU Threads window, you can examine and work with threads that are running on the GPU in the application that you are debugging. For more information about applications that run on the GPU, see C++ AMP Overview.
The GPU Threads window contains a table in which each row represents a set of GPU threads that have the same values in all of the columns. You can sort, reorder, remove, and group items that are in the columns. You can flag, unflag, freeze (suspend), and thaw (resume) threads from the GPU Threads window. The following columns are displayed in the GPU Threads window:
-
The flag column, in which you can mark a thread that you want to pay special attention to.
-
The current thread column, in which a yellow arrow indicates the current thread.
-
The Thread Count column, which displays the number of threads at the same location.
-
The Line column, which displays the line of code where each group of threads is located.
-
The Address column, which displays the instruction address where each group of threads is located. By default, this column is hidden.
-
The Location column, which is the location in the source code.
-
The Status column, which shows whether the thread is active, blocked, not started, or complete.
-
The Tile column, which shows the tile index for the threads in the row.
The header of the table shows the tile and thread being displayed.
[!INCLUDEnote_settings_general]
-
In Solution Explorer, open the shortcut menu for the project and then choose Properties.
-
In the Property Pages window for the project, under Configuration Properties, choose Debugging.
-
In the Debugger to launch list, select Local Windows Debugger. In the Debugger Type list, select GPU Only. You must choose this debugger to break at breakpoints in code that runs on the GPU.
-
Choose the OK button.
-
Set a breakpoint in the GPU code.
-
On the menu bar, choose Debug, Start Debugging. Wait for the application to reach the breakpoint.
-
One the menu bar, choose Debug, Windows, GPU Threads.
- Double-click the column. (Keyboard: Select the row and choose Enter.)
-
Choose the Expand Thread Switcher button in the GPU Threads window.
-
Enter the tile and thread values in the text boxes.
-
Choose the button that has the arrow on it.
- Open the shortcut menu for the GPU Threads window, choose Columns, and then choose the column that you want to display or hide.
- Select the column heading.
- Open the shortcut menu for the GPU Threads window, choose Group By, and then choose one of the column names displayed. Choose None to ungroup the threads.
- Open the shortcut menu for the row and choose Freeze or Thaw.
- Select the flag column for the thread, or open the shortcut menu for the thread and choose Flag or Unflag.
- Choose the flag button in the GPU Threads window.