Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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…

813 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

13 Experts available now in Live!

Get 1:1 Help Now