Looks like I fixed it by selecting Arduino IDE - Sketch - Optimize for debugging.
I checked it on 2 different nucleos stm32.
Unfortunately I can't see variable's value in registers but it's shown in variables section.