Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7535577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:20:19+00:00 2026-05-30T06:20:19+00:00

I originally used Visual Studio C++ Express, i’ve switched to ultimate and im currently

  • 0

I originally used Visual Studio C++ Express, i’ve switched to ultimate and im currently confused as to why the debugger is moving my breakpoints, for example:

if(x > y) {
    int z = x/y;         < --- breakpoint set here
}
int h = x+y;             < --- breakpoint is moved here during run time

or

random line of code      < --- breakpoint set here
random line of code

return someValue;        < --- breakpoint is moved here during run time

It seems to do this at random locations in the code. Is there sometime i’m doing wrong here? I’ve never had an issue with the express version like this happening.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:20:20+00:00Added an answer on May 30, 2026 at 6:20 am

    You are debugging in release mode.

    if(x > y) {
        //this statement does nothing
        //z is a local variable that's never used
        //no executable code is generated for this line
        int z = x/y;         < --- breakpoint set here
    }
    //the breakpoint is set on the next executable line
    //which happens to be this one
    int h = x+y;             < --- breakpoint is moved here during run time
    

    Usually debuggers set hooks inside binary code. If no binary code is executed for int z = x/y, you can’t set a breakpoint there.

    The following is generated by compiling this in release mode:

    if(x > y) 
    {
        int z = x/y;//         < --- breakpoint set here
    }
    int h = x+y;
    cout << h;
    003B1000  mov         ecx,dword ptr [__imp_std::cout (3B203Ch)] 
    003B1006  push        7    
    003B1008  call        dword ptr [__imp_std::basic_ostream<char,std::char_traits<char> >::operator<< (3B2038h)]
    

    To test this, you can perform this simple change:

    if(x > y) {
        int z = x/y;
        std::cout << z << endl; // <-- set breakpoint here, this should work
    }
    int h = x+y;             
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm facing problems when i try to debugging with Visual Studio 2010. My breakpoints
I used Visual Studio 2008 to publish my asp.net website. When I bring up
I originally used JQuery for this project, but now I'm having to use Prototype,
in my activity I originally used a handler to update the UI with data
I have a chess game that originally used an stl list to store the
I have an application that was originally written in Borland C++ and used a
So let's say I have a code checkout that I used --ignore-externals on originally.
I was looking at some same code (a sample MS Visual Studio C++ project)
Visual Studio language extensibility Does anybody know whether there's an open source (or paid)
Does anyone know of a good tool for refactoring resources in a visual studio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.