Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is stepping jumping all over the place rather than following the execution flow of the source file?

0
Posted

Why is stepping jumping all over the place rather than following the execution flow of the source file?

0

There are at least a couple possible explanations for why stepping through code sometimes doesn’t necessarily follow the flow of the source. 1. The code you are debugging is optimized by the compiler . You can typically ensure that you are debugging an unoptimized version of your program by setting your configuration to “Debug” when building a Visual Studio solution. Debugging optimized code is possible but can be quite tricky. See these blog articles for some helpful hints: http://blogs.msdn.com/greggm/archive/2004/12/15/315673.aspx http://blogs.msdn.com/greggm/archive/2006/01/23/516447.aspx 2. The source file you are viewing doesn’t match the code you are debugging. Visual Studio 2005 attempts to ensure that this cannot happen without you knowing about it, but that functionality can be disabled. To ensure that is enabled check the following debugger option: · Tools->Options->Debugging->General: “Require source files to exactly match the original version”. · In versions of Visual Stud

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123