Jump to content
  • Advertisement
Sign in to follow this  
JohnsonGPS

Borland C++ Builder 6.0 Debug does not function properly

This topic is 4249 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I am a brand new C++ Builder 6.0 user, and I could not figure out why the debug function never work as expected. I compiled the following lines and debug it in C++ Builder: int iTest = 1; ---- Line 1 if (iTest > 5) ---- Line 2 iTest ++; ---- Line 3 printf ("%d", iTest ); ---- Line 4 To my surprise, line 2 always meets the condition, and the cursor moves into line 3. To be even more wierd, the cursor skips line 4 after pressing F8 for stepover again. However, although the cursor moves into line 3 after pressing F8 for stepover,line 3 is actually not executed, while line 4 is actually executed by examing the value. So obviously the IDE cheated my eye. Does anybody encounter this problem as well? Johnson

Share this post


Link to post
Share on other sites
Advertisement
If you have optimizations on, the compiler will rearrange the code to make it run faster. Stepping through the source code is then a problem. Make sure you are in Debug mode with optimizations off.

T.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!