Hi, here is a list of things you can check:
- Use OPTIX_COMPILE_OPTIMIZATION_LEVEL_0
- Use OPTIX_COMPILE_DEBUG_LEVEL_FULL
- Install the latest driver, if you haven’t already
- Install the latest version of cuda_gdb, if you haven’t already
Note that cuda-gdb debugging is not up to the same level of OptiX support as Nsight VSE. With cuda-gdb, breakpoints will usually work, but you will not be able to step through source code, you can only step through assembly. You can currently monitor registers, but not local variables. This means that you might be able to find out where something crashes, but stepping through an algorithm can be very difficult. The tools team is working on improving the cuda-gdb experience, I just want you to be aware that it’s not easy to use for general debugging yet.
You might also explore passing the mouse click coordinates to your OptiX program, and put printf() inside an if() block that checks whether the current launch index matches the mouse click coordinates. If your program is not crashing, then another suggestion is to use your OptiX shaders to display debug information to the screen visually, for example color pixels red if they meet some criteria. These are not ideal solutions, but they can be very useful in many situations.