Fix: Breakpoints in wrong lines (=offset) in Visual Studio 2012
Just had a very weird issue in VS2012 which cost me about an hour, so maybe this helps others.
When I placed breakpoints in a certain file, they more in fact displayed one line *below*. Sometimes even in blank lines. And often they didn’t work. This happened only in one file and only after a certain function. I tried a lot of things regarding the function, but that didn’t help.
It turned out that somehow the newlines codes for wrong here. If you look at the file in a hex editor, newline codes are normally:
OD 0A
At the problem location it was only:
0D
And that seemed to cause headaches to VS. Copying the entire text into an alternative editor and then back again fixed the file.