How to develop a USB Host device with the Xiao ESP32-S3

I want to develop code to run in an Xiao ESP32-S3 that is a USB host with a WiFi connection.

As I need the USB connector on the board to download and debug the software, but I also need to use the USB connector to connect to the USB device.

What is the best way to achieve this? (I really don’t want to have to swap USB cables al the time and I also need to see the debug output as the code is running.)

Thanks

Susan

I wasn’t able to find a solution to get this working (USB Host - Integrated JTAG/CDC and OTG at the same time) so used TCP and OTA to debug and flash the code.
Since the board design had been completed already, I wasn’t able to use JTAG and an off-board debugger.
I do have a spare serial port but that was quite slow.