Solved

The breakpoint will not be currently hit. The source code is different from the original version

Posted on 2011-02-16
5
806 Views
Last Modified: 2012-05-11
I got the above error in VS 2008 with a web project in localhost while I put a breakpoint. It used to work fine and suddenly happened yesterday. I deleted BIN folder and added all references from scratch. I also deleted solution file and recreated project. I rebooted the machine also. I checked the build is debug mode and used rebuild all several times. Googled around but still can not figure it out. I searched disk, can not find any PDB files. Strange enough, some files can be debugged (in same folder with same extension). If I put System.Diagnostics.Debugger.Break() at the line, VS does break into debug mode, so the line of code is reachable.

what else could I try?
0
Comment
Question by:Richard_XP
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:TheMozz
ID: 34907353
One thing is to check the Dropdown list in visual studio for the build configuration (Usually Debug or Release). If you change the configurations, it could prevent a project from being built, which can cause that error.
0
 
LVL 4

Author Comment

by:Richard_XP
ID: 34907528
yes, it is DEBUG. some files in the project can add breakpoint without error.
0
 
LVL 8

Expert Comment

by:TheMozz
ID: 34907595
Just for giggles and grins, go into that dropdown list and choose Configuration Manager, and make sure the projects in question are in fact checked to build.

Only other thing i can think of is to delete the obj folder and rebuild it. I ran into that quite a bit when i had several projects in one solution, and only chose to build certain ones in the Configuration Manager.
0
 
LVL 8

Accepted Solution

by:
TheMozz earned 500 total points
ID: 34907675
Check this out:

http://weblogs.asp.net/guybarrette/archive/2008/10/08/the-breakpoint-will-not-currently-be-hit.aspx

One of the common answers was to close VS, delete the .suo (solution user options) file, then reopen the project. See if that works.
0
 
LVL 4

Author Closing Comment

by:Richard_XP
ID: 34908232
Thanks, I delete the contents of the following folder, although the error is still display but VS does break at that line. cheers

"Temporary Asp.Net Files" found at this location : %windir%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

947 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

17 Experts available now in Live!

Get 1:1 Help Now