Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my asp.net project break points are not hitting, even I have checked all debug settings, running it into debug mode as well.

When I drop a break-point on hover it shows message
"The break point will not currently be hit.No Symbols have been loaded for this document."

Thanks in Advance.
Posted
Comments
Shrikant Sonone 3-Sep-12 9:45am    
Can paste the code you want to debug ??
Dasaradhi_r 6-Sep-12 7:27am    
Is your problem solved?

 
Share this answer
 
v2
Following are some of the reasons why your Visual studio will not hit break points.
1) Project is not fully built: For this you clean your solution and make a rebuild.
Still if it is not hitting, right click on the break point, Click Location and
in the dialog that opens, Check the check box (Allow the source code to be
different from original version)

2) The break point is not in the code execution path: For this, ensure you have
put the break point in the right place. Put the break point at the starting of
the event/method, Should not be inside a condition or elsewhere. Also, put the
break point immediately in the Page_load.

3) Debug is not enabled in the application: In your web.config ensure that
following is present:< compilation debug="true"/>

4) You are trying to debug unmanaged code:
1.From the project properties page, in the debug tab, make sure we tick the
checkbox, "Enable unmanaged code debugging"

2.From the menu Tools->Options, navigate to Debugging node, uncheck the
checkbox "Enable Just My Code".

3.Make sure you provide the correct pdb files of the VC6 executable of dll.

Please see the below links if you still have issues:
http://blogs.msdn.com/b/sudeepg/archive/2007/08/13/why-the-debugger-will-not-hit-your-breakpoints.aspx[^]

http://weblogs.asp.net/guybarrette/archive/2008/10/08/the-breakpoint-will-not-currently-be-hit.aspx[^]
 
Share this answer
 
Comments
Squall83 10-Jul-13 7:51am    
Thank you, you just made my day!
I forgot to turn on the "Enable unmanaged code debugging" function and searched for hours.
This happens when PDB file is missing or an old one, not updated. Compiled DLL and the respective PDB file needs to be of same timestamp. You need to make sure that the DLL last modified date and PDB last modified dates are in sync. PDB files are the one responsible that helps you in debugging.

Clean the solution and rebuild all. This should create a new dll along with PDB. Once done, you should be able to debug it.
 
Share this answer
 
What worked for my ASP.NET project on vs2010 is: I ran my ASP.NET project which debugged in internet explorer 10 since it's my default web browser, on the ie10 browser; I unchecked File/Work offline. Try this solution, hope it works for all of you who are having the same problem.
 
Share this answer
 
Comments
Rohit Dot net 7-Jan-14 23:13pm    
May be it is too late but in VS2012 check Test>TestSettings> "LocalTestRun.TestRunConfig" is checked, uncheck it and it will stop skipping the code lines.
Change the source file which can't be hit.
For example, insert a space into the file and save it, and then delete the space and save it.
Build project again.
That's it!
 
Share this answer
 
Run the project in the Debug mode and use F11 to run the application step by step.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900