Skip to content

Instantly share code, notes, and snippets.

@mfrancois3k
Forked from BPagoaga/remote-debugging.md
Created February 22, 2022 20:42
Show Gist options
  • Save mfrancois3k/db9f182b91abe5df2acae9fa235072f7 to your computer and use it in GitHub Desktop.
Save mfrancois3k/db9f182b91abe5df2acae9fa235072f7 to your computer and use it in GitHub Desktop.
Remote debugging

How to remote debug

Debug a project accessed from a remote device.This device should be connected to your local machine via usb.

Step 1: serve your project on host 0.0.0.0

To be able to access your local project from a remote device, you might serve it on the 0.0.0.0 host: npm start -- --host 0.0.0.0

Step 2: activate the usb debugging on your remote device

  • Activate the developer menu by going into your phone infos and touch 7 times the build number. Then go into your system parameters and activate the developer menu.
  • In the developer menu (under system parameters), activate usb debugging.
  • Navigate to your app, for example http://192.168.X.X:4200, and in your browser parameters check "activate usb debugging".

Step 3: activate the usb debugging on your local machine

  • Open this same browser on your local machine, go to about:debugging (firefox) or chrome//inspect#devices (chrome). Activate the usb debugging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment