Tech Talk A software developer on all things tech, and then some

13Dec/110

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

I noticed that my code was not being reflected in the current build of my application. Then taking a closer look and setting a break point at the code that was not being ran, I hit F5 and noticed a bubble with a warning triangle that had the following message.

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

Why

There are a few reasons why this happens. The most common is that the project pdb files are currently locked. These are files that hold your debugging information.

More information on PDB files.

Fix

Method 1 : Simple Rebuild

  • Ensure your build is set to debug.
  • Right click your solution, go to Properties. Make sure your project is set to build
  • Go to Build -> Rebuild Solution. This will clean out your bin folder and update the files.

Method 2 : Clearing out the PDB files

  • Close all files in Visual Studio, then Visual Studio.
  • Delete the PDB files in your bin folder (or where ever you are building to)
  • Open Visual Studio
  • Going to Build -> Rebuild Solution.
  • Reopen the file

If all else fails, I would try a restart. Sometimes the process gets caught up in Windows, and restarting will release the lock to overwrite.

More info and posts on other sites in case I didn't help :

http://stackoverflow.com/questions/2468852/the-breakpoint-will-not-currently-be-hit-the-source-code-is-different-from-the

http://nickstips.wordpress.com/2010/10/18/visual-studio-the-breakpoint-will-not-currently-be-hit-the-source-code-is-different-from-the-original-version/

http://stackoverflow.com/questions/2097805/breakpoint-will-not-currently-be-hit-in-asp-net

http://it.toolbox.com/blogs/programming-life/debugging-net-applications-stopping-the-breakpoint-will-not-currently-be-hit-message-26262

Comments (0) Trackbacks (0)

No comments yet.


Leave a Reply

No trackbacks yet.

%d bloggers like this: