This debugging technique should be common knowledge, but I run across it all the time.
When an error message is confusing, by far the most practical method to figure it out is to:
1. copy the file to a new file, save the original
2. delete code until the message goes away
3. revert to the previous version that still produced the error
4. goto step 2, and delete something else
5. continue until you have the minimum piece of code that generates the error
This usually clears up the understanding of the issue.
The D "dustmite" program (created by crackerjack developer Vladimir Panteleev) can do this automatically.
Recently, I was handed a program with a baffling error in it. I noticed it was loaded with templates, conditional compilation, irrelevant functions, and complex declarations.
Deleting all that fluff out of it led directly to the problem.
This is the most powerful debugging technique I know of. I use it all the time.