Source checksums and breakpoints

In VS 2003 & earlier breakpoints were bound based only on file name, so if the project system found another file with the same name we would bind the bp there. This was a source of a lot of annoyances since files like Class1.cs are everywhere, so in VS 2005 we have added support for source checksums in the compilers, and the debugger looks at these to verify a file.

If we find the correct file, your debugging experience goes exactly as earlier, but some customers have had problems working with sources out of sync with the binaries they are debugging (people may want to try this if the exactly matching sources are inaccessible for some reason).

If you start debugging with mismatching sources, you get a nice dialog informing you that the source is not matching, you can choose to continue to use it anyway. In this case, for the rest of the debugging session, you will not get prompted again, and if you set breakpoints in the file, they will bind.

If you already had set breakpoints before starting to debug, those bp's may not bind. In that case, you can right click on the breakpoint, click the "Location" menu item, and in theĀ  "File Breakpoint" dialog check the "Allow source code to be different from the original version" checkbox. Note that only file breakpoints are affected by checksums.

Alternately, you can turn off verifying checksums altogether from Tools->Options->Debugging->General->Require source files to exactly match the original version.