Moves all tracing code in SC.State within debug mode only, which removes several lines of code and an observer from production builds.