How to avoid unneeded issues with peripheral devices when debugging the application?
Use the Hardware | CPU Options | Reset | At Initialization | Suspend peripherals while stopped option and select the peripheral functions you want to be stopped.
If this option is not supported (greyed out), you can suspend peripherals in an alternative way using initialization scripts.