Question: how to connect iphone to mac for debugging?
Answer: Connect your iOS device to your machine via USB cable. On your device, open the Settings app. ...  Still on your device, open the Safari app and browse to any web page. On your Mac, launch Safari, open the Preferences (Safari > Preferences), and navigate to the Advanced section. ...  Open the Develop menu.