I am unable to read the values of local variables in Optix 7.1 and the latest Nsight Cuda Debugger(Next-Gen). When the debugger hits a break point all I get in the “locals” window is an entry called Launch Details. Here’s a screen grab of the Optix 7.1 sample optixHello. I modified the NVRTC compiler options to include -G. Is there anything else that needs to be done to read local variables?
Nsight Visual Studio Edition 2020.1
You’re right, inspecting locals does not currently work. I tried it and reproduced the same behavior, and then confirmed with the team that it’s not expected to work right now. I apologize for suggesting the optimization and lineinfo flags would help, I had thought it was all working. The team intends to fix this in the near future. In the mean time, maybe I can suggest some alternatives?
The register view should be working in the CUDA debugger just fine, so if you can map any of your locals to a specific register, you’ll be able to see the value. That isn’t normally very easy to do.
Another option, and my personal favorite, is to define a print macro that only activates when you click on a pixel. I’ve posted example code at the bottom of this comment: