Debugging through Matlab

With Visual Studio, I can start Matlab, attach the Visual studio debugger to the Matlab process and then start a Matlab script which contains a call to a mex-file linked to a CUDA library. If the program crashes, the debugger points at the corresponding line in the (CUDA) code.

If I try to attach the Nsight Eclipse debugger to the Matlab process I get the error message "No source available for “pthread_cond_wait@@GLIBC_2.3.2() at 0x3b23a0b43c” and the Matlab window turns grey? Do I have to run Nsight Eclipse and Matlab as root for debugging?

This looks like a normal attach behavior (Matlab is suspended on attach, Debugger is unable to resolve source location and code is compiled without debug information). Did you try resuming the application?