Debugging mobile websites is next to impossible when all you have is your phone, but if you have a Windows PC, you can use Google Chrome’s developer tools to connect to your Android phone and debug it from there, making the experience infinitely better. In this video, I’ll show you how to get set up to do that.
You can find a fully fleshed out written tutorial on the Raygun blog. Here, I’ll just list the steps out pretty quickly. You can also find everything you need for setting up your PC and Android phone for Chrome debugging in the video above.
- Turn on Developer Options and USB Debugging on your phone.
- Install USB drivers for your Android device on your PC.
- Install ADB server and run it on your PC.
- Enable Chrome developer tools to “Discover USB devices” in the “Remote devices” tab on your PC.
- Connect your Android device to your PC via USB.
- Allow USB debugging on your phone, when the popup shows up.
- If that popup doesn’t show up, change connection type to PTP on your phone first.
- Open the “Remote devices” tab in the dev tools and click on your Android device listed on the left.
- Focus the tab you wish to inspect and then click the “Inspect” button for that tab.
And there you go! You’ve now got a remote debugging session running on your PC for your Android device. You should be able to do pretty much anything with it that you would normally do on a desktop website. God bless and happy coding!