This is driven by the Optimization Level setting in the build settings for the target that contains the file you're editing. One of two things is happening… That value accidentally got set to something other than Onone for your debug build The scheme you're using has a configuration set that isn't your debug one. By default, projects come with a Debug and Release config. The Debug config is configured to build Onone, which means without optimizations. And the Release config is configured to build with optimizations. You just need to double check the build configuration selected for your scheme is your debug (usually Debug) one.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: