VS 2008: breakpoints are not hit

Posted on 2014-07-14
Medium Priority
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 75

Expert Comment

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

Accepted Solution

LordWabbit earned 2000 total points
ID: 40196039
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 35

Expert Comment

ID: 40196309
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

ID: 40196515
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
ID: 40196685
click Clean the rebuild

or close the project and re open it

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

840 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