When you are debugging an application, if the source executed by the debugger is different than the actual source code (i.e. the code executed is not the code showed in the source code) and you are sure the pdb is absolutely right for that dll/exe, it means one of these 2 things:
1. your source code is not up to date;
2. you may have non-dos line ending mixed in the file.
I did have this problem in the past days with code I've written pretty much from scratch, it turned up to be case number 2. Probably I copy-pasted a small portion from a mac code. A full conversion to DOS endings of the source file solved the problem. I was plagued by it since two weeks ago, but only in two files, that I didn't change very much in the last days, so I let the problem remain, but today I decided I had to solve the problem because there weren't any reasonable explanation of this weird problem. Fortunately I had the idea of checking the line endings of the file and that solved my problems.
No comments:
Post a Comment