In order to start, you have to make sure that’s your extensions are up to date.
Start by checking that you already have the ADB if you’re not take a look here: LINK
then make sure to enable developer options …
now Install the ADB Commands for VSCode extension
you have to make sure that you add the ADB to our system Environment variables
start typing ” envir..“ in cortana search box and click over-edit the system Environment variables
now click over “ Environment variables”
select the path and hit Edit
now you have to add the path correctly to the platform-tools
in my case it’s
“C:\Users\ASUS\AppData\Local\Android\Sdk\platform-tools “
Click “New” and add the previous path and that’s it!
Now you must enable USB debugging in your device.
to do so it depends on your phone model but generally
1. Navigate to Settings > About Phone > scroll to the bottom > tap Build number seven (7) times. You’ll get a short pop-up in the lower area of your display saying that you’re now a developer.
2. Go back and now access the Developer options menu, check ‘USB debugging’ and click OK on the prompt
in the VScode hit Ctrl+shift+p and select
ADB::Connect to device IP
To find your phone’s IP address, go to Settings > About device > Status.
or hit IP in the setting search box because it depends on your phone brand
Note That :
fist you may have to connect your phone via USB then after everything is done you can unplug it
ALTERNATIVELY :
you can connect your phone without any extension simply by followings these steps :
- plug your phone via USB.
- open your vs terminal ( you can open the terminal using Ctrl+ `)
adb tcpip 5555
adb connect [YOUR_IP_address]
3. Unplug your phone and enjoy.