In Safari settings for iOS, there is an option under advanced, which allows you to switch "Web Inspector", which turns this feature on and off (at least this is on iOS 6, I do not have older devices to check this).
There is also a limitation that:
Important. You can only check applications on devices ported to your device with Xcode. You cannot check applications downloaded from the App Store, even if this is your application.
Therefore, I expect developer apps to be the only ones you can manipulate in this way.
source share