Click here to Skip to main content
14,984,270 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
This is driving me crazy! Every time I want to debug my code, the breakpoint does NOT turn solid red and when I hover over it, it has the following messages:

- The Breakpoint will not currently be hit. The source code is different form the original version.
- To allow the breakpoint to be hit when the source code is different, right-click on the breakpoint, choose 'location', and turn on 'allow the souce code to be different from the original version'
- To allow this for all breakpoints, disable the ooption 'require source files to exactly match the original version' under tools>option>debugging>general

In any case, I've also read about emptying a particular Cache folder, which I've done in the past to no avail. I sometimes modify the code behind, slightly, save, and it used to run/debug without problems (I'm attaching to process) then, I started getting this annoying message. How do I fix this? I don't understand what is mean by allowing the breakpoint to be hit when the souce code is different... I mean, of course it is different, I save it, and it used to execute it. How come it's not doing it now? On top of that, I right-clicked on the files and built that particular page (the entire solution is a Web Site solution (WSA), so it cannot be compiled as a whole)


PS In the past, I used to get 'not symbols have been loaded' or something like that... that does not appear anymore, but instead, I get the messages listed above. Any help/insight will be appreciated.
Updated 9-Jul-15 7:28am

1 solution

It looks like you are having an old DLL somewhere which is in use and is not allowing the debugger to hit your code.

Try the following:
1) Close your solution and delete all the DLLs in the build folder. (EDIT: Also, remove all output folders and obj folder to delete the PDBs as SA suggested in the comments)
2) Check if the assembly is in GAC(check both 32 bit and 64 bit folders) or not, if it is there, remove it.
3) Rebuild/redeploy everything.
4) Restart IIS App Pool(in case you are hosing your code in IIS).
5) Restart local web development server.
Reasonable advice, but I would recommend to delete all "obj" directories and all output directories, instead of deleting "DLLs". (Up-voted with my 4.)
Abhipal Singh 10-Jul-15 8:12am
Thanks SA! for adding what I missed :)

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

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