I'm working on a compiler for the CLR, and I mostly have it working. I'm trying to generate debug information, and I can get it to create an embedded PDB in the generated assembly where all the debug metadata looks right. When I load the assembly, the Modules view says "Symbols loaded." But I can't get the debugger to recognize breakpoints, and if I throw an exception inside the code, it says,
Source Not Available
Source information is missing from the debug information for this module.
When I look at the assembly in DotPeek, it does not say "Debug" on the assembly's main name line, the way it does for C# assemblies built with debug information. I'm not sure what's missing, though.
What can cause this error to come up? In case anyone needs a test case to look at, here's one.
EDIT: Please read the question and take note of the Tags. I've gotten a couple different answers on here that are bog-standard "how to get PDBs to load under normal circumstances" answers. This question is not about normal circumstances. I am building the compiler and it is generating incorrect PDBs. I need a way to debug the output of the PDB code that I am generating myself.