NVIDIA / nsight-vscode-edition

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

Cannot debug code outside project with "justMyCode:false" option #4

Closed donglinz closed 2 months ago

donglinz commented 3 years ago

Hi,

This is a awesome vscode plugin that I use everyday.

In vscode debugging for python, code outside project can be break-pointed via "justMyCode":false option in launch.json file like below.

{
            "name": test",
            "type": "cuda-gdb",
            "request": "launch",
            "program": "${workspaceFolder}/test/main",
            "justMyCode": false,
}

However this config does not work correctly for CUDA debugging, it says justMyCode property is not allowed. image

I believe equivalent functionality is already provided by cuda-gdb debugger (i.e., break point outside project). Can we support it in this nsight vscode extension as well?

sanannavyaa commented 1 year ago

Hi! We currently do not support "justMyCode". Can you please describe your use case in more detail so we can consider this a feature request? (Details like what you're trying to debug, where you're trying to set this breakpoint - in a library that you wrote and is outside this project or a standard library etc)

huynhducloi00 commented 3 months ago

ok here my use case: The cmake has 2 targets: 1) the library add_library(library SHARED gemm_lowbit_kernel.h gemm_lowbit_kernel.cu) #gemm_lowbit.cpp target_link_libraries(library PUBLIC ${TORCH_LIBRARIES} Python::Python) 2) the execution for testing the library add_executable(running gemm_lowbit.cpp) target_link_libraries(running library)

Obviously i only want to build the "so" once, and play with the exec file hence, when doing this: { "name": "CUDA C++: Launch", "type": "cuda-gdb", "request": "launch", "program": "${workspaceFolder}/build/running", "debuggerPath": "/miniconda3/bin/cuda-gdb", },

in the launch config, i am not sure why we don't have "justmycode":false option. Obviously i have the source code of the library.

3) another question is how about a ".so" file that i don't have the source code, how to step inside to their code. i guess this is not possible. but what if i build their code from scratch, in that case, i should be able to debug?

sanannavyaa commented 2 months ago

i am not sure why we don't have "justmycode":false option

We do not yet support it because we do not have enough demand for it. Thanks for sharing your use cases we will take it into consideration.