Debugging CUDA MEX in VS2017

Hello,

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

https://ch.mathworks.com/matlabcentral/answers/450099-debugging-cuda-mex-in-vs2017-on-volta-gpu?s_tid=srchtitle

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:

https://ch.mathworks.com/matlabcentral/answers/88541-failed-to-attach-matlab-in-visual-studio-2010-in-order-to-debug-cuda-kernel

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