Ever wondered how to open console & debug your site on android devices ? Well, it is possible to remote debug live content on an Android device from your Windows, Mac, or Linux computer. Lets proceed step by step:
Step 1: Enable Developer Options in your Android device
1. Go to Settings
2. Select Developer Options
3. Enable USB Debugging
Note: If you are unable to see Developer Options in your device, go to About Phone, find Build Number (for ex. MIU version), tap several times until you see a message "Developer Mode is ON". Go back to Settings menu. You will be able to see Developer Options over there.
Step 2 : Opening DevTool in Google Chrome
1. Open Google Chrome
2. Go to Settings and click on More Tools
3. Select Developer Tools
Note: Remote debugging does not work in Incognito Mode.
Step 3: Opening Remote Device Option
1. Click on 3 dots (Settings)
2. Select More Tools
3. Click on Remote Devices. A Remote Devices Tab will appear.
Step 4: Connect your Android device with your PC using a USB Cable.
Make sure USB debugging option is enabled. If it says no device connected, try disable and enable again to ensure proper connection. You can also use the option "Revoke USB debugging authorizations".
Step 5: Device Authorization
Once connected, it will display ask to authorize your device first. Authorize the same from your device.
Once authorization is done it will show: "One device Connected". Double click on device name and details will appear on tab.
Step 6: Open your Application in desired browser
1. Open browser in android device, and hit the URL of your application.
2. Navigate to those pages which you want to debug.
3. Observe the URL in Remote Device Tab of your browser in PC
Step 7: Debug and Inspect
Click on Inspect. You will be able to see a replica of your android device in your browser. You can open console and debug from here. Both devices are interlinked at this stage. Whatever activity is performed in the browser of one device, will automatoically reflect in the other connected device.
Happy Debugging !