I'm working on a little C++-Game in Visual Studio 2008. I want to see the content of a vector after a couple of seconds or after I pressed some buttons. Breakpoints are useless in this case, because they stop me at every call of the gameloop (~60 times per second). How do I debug in this case?
Thanks!
Use function OutputDebugString from Windows API. You can call it anytime you want e.g. every 100th loop in your code.
Function info is here
Please read all comments on this page - some people claim that in your IDE (VS2008) output of this function is shown in "Immediate Window" not the "Output".
You can set conditional breakpoints, i.e. breakpoints which hit at a certain position only when a given expression is true. You can, for example, set a breakpoint which hits only every nth time in a loop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With