I've found a way to debug in sleep mode: Don't initialize the SWD Port, e.g. GPIOA. To skip init for e.g. GPIOA, comment line 124 in "os/hal/platforms/STM32/GPIOv2/pal_lld.c" :
where do you inserted the sleep mode debugging activation DBGMCU_Config( DBGMCU_CR_DBG_SLEEP | DBGMCU_CR_DBG_STANDBY | DBGMCU_CR_DBG_STOP, ENABLE); in your project?
I use the following for debugging: STM32F415RG Atollic TrueSTUDIO gdbserver for ST-Link arm-none-eabi-gdb chibistudio ...
where do you inserted the sleep mode debugging activation DBGMCU_Config( DBGMCU_CR_DBG_SLEEP | DBGMCU_CR_DBG_STANDBY | DBGMCU_CR_DBG_STOP, ENABLE); in your project?
I use the following for debugging: STM32F415RG Atollic TrueSTUDIO gdbserver for ST-Link arm-none-eabi-gdb chibistudio ...