Once the application is deployed on the device, either through the App store or as an adhoc or enterprise build, to debug problems you need to analyze the crash logs and console output from the device.
To get crash logs and console output with Xcode, you need to: