Arduino Nano ESP32 Debugging Breakpoints

Having got some assistance in the Arduino community it seems a physical press of the RESET button was is required and the USB still identifies as USB JTAG/serial debug unit after compiling with ‘Debug mode (Hardware CDC)’. So after some searching, I found this after adding this and restarting debugging… Voilà!

So, to help others, use the following config:

[env]
framework = arduino
platform = espressif32
board = arduino_nano_esp32
upload_protocol = esptool
debug_tool = esp-builtin
build_flags =
	-D ARDUINO_USB_MODE=1
	-D ARDUINO_USB_CDC_ON_BOOT=1

Then reset using B1+GND, then run debug. An extra physical press of RESET wasn’t needed.