Inconsistent Call Stack in Visual Studio 2022
When using VS 2022 to debug C++, I encounter a problem where the call stack is inconsistent, some calls of the stack being followed by unrelated ones.
Example
This line in the stack:
Terrain::get().updateTerrain();
Is followed in the stack by a line in this function:
void EntityManager::updateAnimations(float dt)
This is inconsistent because the updateTerrain() function doesn’t calls the updateAnimations() one. Also, I would expect the next call to be a line located in the updateTerrain() function.
I don’t have this problem in XCode.
I precise that I don’t use the “observer” pattern.
In VS 2022, I compile in “Debug” mode, and with the “Local windows debugger”.
The “Debug” mode has “Optimization” disabled, “Inline function expansion” disabled, “Enabled intrinsic function” set on “no”.
What should I do to have the stack correctly tracing each step?
EDIT
Read more here: Source link


