this is intended as a friendly hint for anyone who uses a ESP32 board with a SEGGER jlink debugger and VS Code and Platformio.
I had spent a good amount of time to get the following configuration to work:
*** ESP32-DevKitC V4 board hardware**
*** SEGGER jlink JTAG debugger adapter**
*** Platformio Core
*** MS Windows 10 Enterprise 64-bit OS**
Problem: I have seen multiple failures of the openOCD debugger. Error messages included
“Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED.” And openOCD had tried an even more confusing fall-back to a FTDI serial debug adapter; which was hard to comprehend as this was not configured at all in my system setup.
Solution: The issue was resolved after I have changed the USB driver for the SEGGER jlink from “SEGGER” to “WinUSB”. I have used the J-LINK configurator for this; see the attached screenshot. Debugging in Platformio works fine now.
I trust this is helpful for others.