Skip to content

Instantly share code, notes, and snippets.

@yuxuan-z19
Last active June 26, 2025 09:34
Show Gist options
  • Save yuxuan-z19/68dfa89137da7fc8c7f8f1dcf2b32b05 to your computer and use it in GitHub Desktop.
Save yuxuan-z19/68dfa89137da7fc8c7f8f1dcf2b32b05 to your computer and use it in GitHub Desktop.
VSCode debugger configs for Nsight Visual Studio Code Edition
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/local/cuda/bin/nvcc",
"cStandard": "gnu23",
"cppStandard": "gnu++23",
"intelliSenseMode": "linux-gcc-x64",
"compilerArgs": [
"-arch=sm_80"
]
}
],
"version": 4
}
{
"version": "0.2.0",
"configurations": [
{
"name": "CUDA C++: Launch",
"type": "cuda-gdb",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"preLaunchTask": "C/C++: nvcc build active file"
}
]
}
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: nvcc build active file",
"command": "/usr/local/cuda/bin/nvcc",
"args": [
"-g",
"-G",
"-arch=sm_80",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
@yuxuan-z19
Copy link
Author

yuxuan-z19 commented Jun 26, 2025

  1. Install ms-vscode.cpptools and NVIDIA.nsight-vscode-edition
  2. Place the .json files under your workspace ./vscode
  3. Start debugging (on A100, note that "-arch=sm_80" flag is specified to enable WMMA)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment