How to get XIAO ESP32C6 to reset before debug

To get debugging to work I have to manually press the “RESET” button on the board first.

Here is my platformio.ini:

[env:seeed_xiao_esp32c6_DEBUG]

board = seeed_xiao_esp32c6
framework = arduinobuild_type = debug
debug_tool = esp-builtin
debug_build_flags = -D CORE_DEBUG_LEVEL=5
;-D ARDUINO_USB_CDC_ON_BOOT=1
;-O0 -g3 -ggdb3
board_debug.openocd_board = esp32c6-builtin.cfg
debug_load_mode = modified
debug_init_break = tbreak setup
debug_load_cmds = loadupload_port = COM7

debug_server = $PLATFORMIO_CORE_DIR/packages/tool-openocd-esp32/bin/openocd
-c “set ESP_RTOS none”

-f $PLATFORMIO_CORE_DIR/packages/tool-openocd-esp32/share/openocd/scripts/board/esp32c6-builtin.cfg

monitor_dtr = 1
monitor_rts = 0
monitor_filters = esp32_exception_decoder

The problem is that it’s a real PITA to push that super-tiny little button every time code is rebuilt and debugged. Is there a working method of sending a RESET to the board through platformio?

I have tried some of these options-c “adapter srst_pulse_width 200”
-c “adapter srst_delay 250”
-c “reset_config srst_only”
-c “reset init” ; halt

and even tried pre and post extra_scripts that try to do various methods of reset, but none of these work. The debug fails with many error messages.

I just want a simple way to have platformio reset the chip before starting to debug.

I just can’t get anything to do that simple task.

Anybody know how to accomplish this?