You can do it with other debugger too: Lauterbach, Segger Jlink.
If reset pin is also reconfigured, the point is to do repeated POR (eg. by using a jumper J107, J10), until the debuger gets to hold the core, before your code re-configures the pins.
Steps:
- set a debugger loop to reset and hold
- manually power on reset the board until the debugger gets to hold the core