This is how I test on mobile devices (Android phones) when developing.

It’s based on the official guide for remote debugging on Android devices with some extra steps I add to work on any web application project:

  1. Enable developer mode (click the Build Number 7 times!)
  2. Use ngrok to expose your local application
  3. Note that you’ll need to connect your agent to your ngrok authentication account
  4. Navigate to the .ngrok-free.dev URL from the device
  5. Plug your phone into your computer
  6. Open chrome://inspect#devices in a Chrome tab to get a dev inspector synced to your phone

Now you can inspect, modify elements, debug, throttle, etc! Happy coding!

Edit:

On my Windows machine running Ubuntu in WSL, I had to install ngrok with sudo and get around an “invalid host header” error, so my full command to launch a project is:

sudo ngrok http --host-header=rewrite 8080