Solved

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

Posted on 2011-02-16
5
802 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

22 Experts available now in Live!

Get 1:1 Help Now