compilation for device debugging cuda-gdb

Hi,

I want to debug my code on the device, and I passed the --device-debug 3 flag to nvcc. I then get an error:

nvcc fatal : Option ‘-G’ requires nvcc compilation of .cu files to object files

Does anyone know what is going on? FWIW, I am using the findCuda script.

Thanks,

-Nachiket