

WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.
#define SCL TRISB4 // I2C bus | |
#define SDA TRISB1 // | |
#define SCL_IN RB4 // | |
#define SDA_IN RB1 // | |
// initialize | |
SDA = SCL = 1 ; | |
SCL_IN = SDA_IN = 0 ; | |
// make master wait |