2,308 votesAnonymous commented
This can be done in managed way and without corrupting debuging expirience.
Look at Cudafy:
They support debugging via emulation, all GPu cards and CPU (OpenCL) and NVidia (CUDA).
So basically you would write functions as usual but decorated with some attribute:
static void SomeFunc(CLThread thread, int someParam)
//normal C# code