break point is not hitting while debugging

It worked for me. Try this.

First try rebuilding your project by right mouse click the project > Rebuild If that doesn't work, try a clean of the project (right mouse click on the project > clean)

If that didn't work check this:

Right mouse click your project
select [Properties]
select the [Build] tab
make sure [Define DEBUG constant] and [Define TRACE constant] are checked
Click the [Advanced] button at the bottom of the Build tabpage
Make sure that [Debug Info:] is set to [full]
Click [OK] and rebuild the project ;-)

Hope that works for you! (step 6 generates the .pdb files, these are the debugging symbols)


Some times this occurs if the sourcecode is been copied from the network folder, it messes up the symbol settings. Below solution works for me everytime

  • In debug mode, select debug->windows->modules
  • Check your dll symbolStatus . Make sure that it is loaded into the project (i am sure now the status is not loaded )
  • Right click your dll, click symbol settings.
  • And manually add your symbol path (.pdb file path)
  • And again right click the dll, and click load symbols

Hope this helps


Have a look at these articles

  • Why would the debugger not be stopping at a breakpoint in my ASP.NET application?
  • Why does Visual Studio sometimes not go to my breakpoints?
  • Reason for VS.NET ‘current breakpoint will not be hit’ warning?

Tags:

C#

Asp.Net