I’ve experienced strange thing with debugging with VS debugger. When I break in
and debug step by step (F10) , debugger behaves strangely in lines 137,138. It jumps from line 136 to 138 omitting line 137! Then it moves back from 138 to 137 and continues. Look at the gif attached.
I compile code under DebugGameEditor configuration. I use engine version downloaded by epic launcher. I did not build engine localy. I’ve already tried to rebuild project both from VS and Editor.
How is this possible ?
thanks in advance.
There are a couple of possible causes that spring to mind
If compiled code is different from source files you will see this behaviour… make sure build is up to date
Visual studio optimizes the compiled source often combining multiple lines of source code into a single execuble line… make sure optimization is turned off at least for debug configurations… 0d flag maybe? Check your c++ project configuration to disable optimization
I came across a similar problem. It turns out that debug symbols in the downloaded version are optimized. If you want to debug engine source code, you need to build the engine source code with Debug-Editor config.