VS 2008: breakpoints are not hit

Posted on 2014-07-14
Last Modified: 2014-07-25

I am runing Visual Studio 2008 solution in Debug mode, however, it doesn't stop on breakpoints I am placing.
What can be the reason?

Thank you in advance.
Question by:quasar_ee
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    Have you tried a complete rebuild (not build) of the application?
    LVL 11

    Accepted Solution

    Check that the solution is rebuilding the project, it might have been set to not build for some reason (right click properties) so the symbol files are out of date.  Also check that the references are to the project reference not a dll reference.  Best way to do that (AFAIK) is toremove them and add them back manually.  Take a screenshot before you start removing stuff, for later reference.
    LVL 32

    Expert Comment

    to add to above suggestions:

    - you may look if the last build was successful. if - for example - you had a linker error, you might run an older copy of the program and the debugger would not attach.
    - set the first breakpoint to main or _tmain function (or YourApp::InitInstance for a mfc project).
      + if it breaks there, check the breakpoints you have set into other sources and check whether the bullet
         icons are full or have a exclamation mark such that they were not up-to-date and cannot be hit. if so,
         you should check whether the source is the one which was included in the build (check the file path by
         hovering the tab of the edit window for the source). if that is all ok, try to move the breakpoint not hit
         up to the first if or while condition of the function. if that doesn't help, check where the function was called
         and set breakpoints above the blocks where the functions were called. repeat the action until you
         reach the main function.
      + if it doesn't break, check whether the .exe file of your project is up-to-date and that the breakpoint bullet
         in main is really active.

    LVL 83

    Expert Comment

    Can you show us a screenshot of the breakpoint while in debug mode? Even better if you can include the tooltip that shows when you point your cursor at the breakpoint.
    LVL 16

    Expert Comment

    by:Kamal Khaleefa
    click Clean the rebuild

    or close the project and re open it

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now