NVIDIA / nsight-vscode-edition

A Visual Studio Code extension for building and debugging CUDA applications.
Other
68 stars 11 forks source link

Debug specific block/thread #43

Closed manurare closed 2 months ago

manurare commented 3 months ago

Hello,

I know I am having a warp illegal address on block (20, 15, 0) thread (0, 14, 0). However, I am not able to debug at those specific coordinates.

I can debug my cuda kernel OK with VScode nsight extension. I am adding a conditional breakpoint like this inside the kernel but the debugger never stops. What am I doing wrong?

image

yczhang1028 commented 2 months ago

Hi, this conditional breakpoint expression is not valid, there is no syntax like @blockIdx(20, 15, 0). If you want to stop at that thread, you can use this CUDA Focus to switch focus to specific CUDA kernel, and make the break point Or you can specify blockIdx.x == 20 && blockIdx.y=15 ...., but this might be slow to reach. Prefer to use the first way. image focus_cuda

manurare commented 2 months ago

Thank you. Really useful!