Android 4.2 and higher
The USB Debugging is in the “Developer Options” menu item, but it is hidden, you need to reveal it first:
Go to Settings -> About Phone.
Go to “Build Number” at the end of the Scroll list.
Tap on “Build Number” ("Android version" for some devices) repeatedly 7 times. On your third tap, you should see a message indicating that you only have 4 more taps to go to ‘become a developer’.
Go back to the Setting page. You should see the Developer Options menu item in your settings list now.
Open Developer Options and check USB debugging -> ON.
In case you are turning on the USB debugging on a Huawei device, make sure to also "allow the debugging usage in charge only mode" in the Debugging section in Developer Options. This will prevent most of the cases, where USB debugging is turning itself off, because of EMUI.
For EMUI 5.0 and higher, it might be necessary to connect the phone to the PC prior to enabling USB debugging, because it may otherwise keep turning itself off automatically.
In case you are turning on the USB debugging on a Xiaomi device, make sure to enable all the categories in the Debugging section in Developer Options. This will ensure that the connector app is able to be installed on your phone.
Enabling both these options will require you to have a SIM card inserted in the phone and also to be logged into Mi Account.
Go to Settings -> Developer options and enable USB debugging.
Go to Settings -> Applications -> Development and enable USB debugging.