Debugging CUDA MEX in VS2017


I’ll mirror the question from the Mathworks here as I’ve run into a similar issue:

I’m working with CUDA Toolkit 11.1 with VS2017 integration, GeForce RTX2080Ti, driver version 461.09. I’ve written a library I would like to wrap in a cudamex file and call from Matlab. I’m getting a “CUDA_ERROR_ILLEGAL_ADDRESS” error, and would like to Debug. Following something similar to this procedure:

fails because the legacy debugger does not support my graphics card and skips all breakpoints. As I understand, the next gen debugger currently does not support remote debugging.

Is there some workaround such that I can debug my CUDA MEX program?

Thanks in advance