Is there any practical way to use a SWD-based debugger such as those made by Segger to debug a program for the STM32LF1xx which uses low-power modes and sets the clock speed very slow? The debugger seems to choke every time the chip is set to an energy-saving mode. It's understandable that debugging won't work while the unit is in low-power mode, but unfortunately once the debugger chokes I can't figure any way to make it work again except to completely reset the CPU. It's possible in some cases to mitigate the problem by using a conditional-compilation flag to disable the code that would put the chip into low-power mode, but this makes it very difficult to troubleshoot the code which puts the unit into and out of low-power modes.
Are there any tricks to allow the debugging tools to work usefully in such situations?