break point is not hitting while debugging

Possible exact duplicates:

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

while debugging,the modified source code the break point is not hitted for a particular aspx page and the following error is shown in the break point

“the break point will not be currently hit.the source code is different from the original version”

but for other page it is working fine.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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)

Method 2

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

Method 3

Have a look at these articles

Method 4

That suggests the build that’s running doesn’t match with your code.

Try performing a “clean”, make sure that you’ve stopped any previous debugger sessions etc, then rebuild and retry.

Method 5

make sure there are not instances of w3wp.exe running. I had several and closing them fixed it for me.

Method 6

Visual studio repair solved the problem for me

  1. search for visual studio installer in start
  2. select more option for the version you are using and click repair.

Method 7

In my i changed the connection string but in the browser it was referring to old string so i just did ’empty cache and hard reload in chrome browser’ and it worked

Method 8

This problem occurred to me when I had copied the project. In fact, by opening the old code file if breakPoint is inserted, you will see that it will work. So learn the correct copying method.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x