When Xcode runs for first time, it will ask you to enable developer mode.
However, if you end up saying ‘No’ for some reason (I said due to security without thinking) and want to enable again, just run this in the terminal:
DevToolsSecurity -enable
No more pesky password prompt every time now. Enjoy iOS and Mac development!