WebREPL allows programming Micropython, modifying, adding and deleting files using your home network without having to disconnect from the internet. Your device doesn't even have to be physically connected to a PC , the option to use the normal usb com port still remains.
WebREPL is an option built into the Thonny IDE and the following instructional steps were written while using Thonny and a variety of ESP32 modules. It's obviously not as fast to use as a usb com port but I think it works well and you don't even have to be in the same room as the device..
1./ Using Thonny and your device connected via usb save the following code to the device as boot.py. Rename SSID and PASSWORD to suit your network
import network
import time
import webrepl
def wifi_connect():
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PASSWORD)
while not wlan.isconnected():
time.sleep_ms(100)
import webrepl_setup
wifi_connect()
webrepl.start()
2./ In the Shell type "import boot"
3./ The resulting output should ask whether you want to enable webrepl on boot.
4./ Type E and press enter.
5./ It then asks for a password followed by confirmation, enter and confirm your password.
6./ After that you should be back at the prompt in the Shell ">>>"
7./ Now comment out the line of code "import webrepl_setup" and save the modified code to your device as boot.py.
8./ In the Shell type "import boot"
9./ This time you should get the following message in the Shell, your URL details will probably be different.
WebREPL server started on http://192.168.1.215:8266/
Started webrepl in normal mode
10./ Finally goto "Tools - Options - Intepreter and change the port to WebREPL , and enter the url from the previous step eg. ws://192.168.1.215:8266/ , then the password. When you click "OK" the Shell should say WebREPL connected and the files on the device should be refreshed in the file view pane of Thonny, this takes a few seconds so be patient.
Boards tried and tested successfully
ESP32 Devkit V1
ESP32 S2 DevkitC
Nano ESP32 S3
Lilygo T display with ESP32 S3
Rasberry Pi Pico W (RP2040)