I'm working with STM32F411RE but I presume the problem is the same for any STM32F, and possibly others.
I couldn't find in the reference manual whether or not the RTC is halted during a debug session. For any other IPs, including those clocked with different clock sources like the watchdog IP, it's clearly mentioned that debug halting is configurable or at least the behavior is fixed and given.
What about the RTC ?
Best Answer
Found the solution: The STM32F411 have a register on the debug IP controlling the halted state of the RTC. Register is
Reset state is 0. The field is
Reference manual p 830
My mistake was to not search in the debug IP part of the documentation but in the RTC part.