[Optix 7] How to debug sbt

We don’t yet have any special OptiX documentation for Nsight tools, but the regular tools documentation should generally work, e.g., NVIDIA Nsight Visual Studio Edition | NVIDIA Developer. For setting kernel breakpoints, the main thing to know about OptiX is that your kernel launch is named “megakernel_simple”. In Nsight tools, you can use a regex match with “megakernel” if you need to.

While it might be a last resort, printf() can be quite useful for catching errors and crashes, especially if you can limit the amount of spew. Sprinkle unique print markers before and after the region where you suspect a crash, and watch for which print is last, and which ones don’t show. Then you can narrow down and bisect the crash by adding another unique marker between the last one shown and the first one not shown. It may be useful to limit your printf() to a specific region or pixel by using optixGetLaunchIndex().


David.