Calling a host function from a __device__/__global__ function

I’m a new guy to Cuda.
I add a printf() in the global function to watch some variables.
When building it returns an Error: calling a host function from a device/global function is only allowed in device emulation mode

i am building under the EmuDebug. How can i set the device emulation mode???
how can i watch the variables in the global/device function

Thank for all replies