Cuda-gdb can't step into kernel code in WSL2

1154330861
Tue, 07 Oct 2025 14:46:11 +0000
CUDA-GDB

Problem I encountered

As the topic says, I keep encountering this issue:

[Detaching after vfork from child process 5146]
WARNING: Debug interface is not enabled. Please see https://docs.nvidia.com/cuda/cuda-gdb/index.html#supported-platforms for more details.

My environment

🦄  uname -r
6.6.87.1-microsoft-standard-WSL2

🦄  nvidia-smi
Tue Oct  7 22:43:46 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.64.01              Driver Version: 576.80         CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3070 ...    On  |   00000000:01:00.0  On |                  N/A |
| N/A   53C    P5             21W /  125W |    1450MiB /   8192MiB |      8%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A              33      G   /Xwayland                             N/A      |
+-----------------------------------------------------------------------------------------+

I already set `Allow access to the GPU performance counters to all users` in NVIDIA Control Panel.

And I already set all the related environment variables.

PS C:\WINDOWS\system32> reg query "HKLM\SOFTWARE\NVIDIA Corporation\GPUDebugger" /v EnableInterface

HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\GPUDebugger
    EnableInterface    REG_DWORD    0x1

PS C:\WINDOWS\system32> reg query "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v TdrDelay

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    TdrDelay    REG_DWORD    0x3c

PS C:\WINDOWS\system32> reg query "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v TdrDdiDelay

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    TdrDdiDelay    REG_DWORD    0x3c

PS C:\WINDOWS\system32> reg query "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v TdrLevel

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    TdrLevel    REG_DWORD    0x0

11 posts - 2 participants