Yeah, we’re pretty much SOL for debugging. One thing I’ve tried is to simply take my CUDA code and debug it on a linux machine. Unfortunately, many may not have an extra machine with a tesla card and cuda installed just lying around. So another option is to install linux on your computer. I tried doing this with my Mac Pro, and kind of got it to work, but ended up deleting the partition again, due to it being a pain in the butt, and the fact that I didn’t really need it at the time (did it more for the sake of doing it than because i needed it). I was able to get OpenSUSE to install using a combination of bootcamp and a utility called rEFIt. You should be able to find some details if you do some googling. It will probably be a lot of effort though.
The other thing that I’ve done is to take my CUDA code, and then convert it back to regular c or c++ code. I can then use xcode to debug it. This works for making sure that your algorithm is correct, and I’ve found it to be a lifesaver. Unfortunately, it doesn’t do anything for tracking down CUDA specific quirks and errors.
It would be very nice if NVIDIA and Apple would work together and put out a kick-ass CUDA plugin for Xcode… HINT HINT/NUDGE NUDGE