Debugging Optix 7.1 with Nsight

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?

Optix 7.1
Nsight Visual Studio Edition 2020.1
Cuda v11.0

Have you turned on lineinfo and disabled optimizations in your compile options?

    module_compile_options.optLevel                  = OPTIX_COMPILE_OPTIMIZATION_LEVEL_0;
    module_compile_options.debugLevel                = OPTIX_COMPILE_DEBUG_LEVEL_LINEINFO;

Yes, I tried that and it didn’t make any difference.

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:


David.

Thanks for confirming and providing some workarounds!