Keeping it in sync. as in debugging it in the linear fashion instead of jumping around? I think that would be even more confusing since that is not what the compiled optimized code is doing.
It is good practice to debug everything with no optimization first (if possible) and work out the bugs functionally then you optimize it to get some extra speed/smaller memory footprint. If there is problems there then you take a look at the debugger with the optimized code to see what the compiler did to break your previously working functionality.