When we released our decompilation scenario with Visual Studio 16.5 it served as the perfect platform to unlock more debugging scenarios for support engineers. In the VS 16.6 preview we are providing some very important incremental improvements. For example we now use the PDB (Symbol file) to improve local variable naming. PDB Symbol files represent a record of how the compiler translated your source into Common Intermediate Language (CIL), this includes info on things like line number and variable names.

Most developers use variable names to help tell a story about what is occurring in code, so if we can decompile while maintaining this information, it might make the task of supporting your apps easier when source code is not readily available. Lets look at this example where we have an integer and a string with obviously contrived names:

generic local variable names for int and string

Now with the improved decompilation process we can use existing PDBs to produce local variables that more accurately represent the names you originally developed with:

Improved local variable names for int and string