In the disassembled source I'm finding that there are few local variables, which makes debugging harder. As it happens I can go back and find the (real) source code, which looks like:
string pluginFileName = Path.GetFileName(desc.AssemblyName);
string pluginFullPath = Path.Combine(PluginPath, pluginFileName);
Assembly a = Assembly.LoadFile(pluginFullPath);
result = a.CreateInstance(desc.TypeName, false, BindingFlags.CreateInstance, null, args, null, new object[0]);
whereas the disassembled source code is:
string fileName = Path.GetFileName(descriptor.AssemblyName);
obj2 = Assembly.LoadFile(Path.Combine(this.PluginPath, fileName)).CreateInstance(descriptor.TypeName, false, BindingFlags.CreateInstance, null, args, null, new object[0]);
While I'm not expecting the disassembled source code to be the same as the real source code, with the disassembled one I can't see the value of pluginFullPath or examine the result of Assembly.LoadFile().

Could the disassembled source be made more debug friendly?
rich257
0

Comments

1 comment

  • Alex D
    I understand your idea. I'll have a look if there's an easy way to get more intermediate local variables, but I believe that at the moment reflector only creates a local variable where the c# compiler has left the variable in the IL.

    Of course, it's harder to use, but I would select the region of source that you want to see the value of and use "Quick watch" to see its value.

    Cheers,
    Alex D
    0

Add comment

Please sign in to leave a comment.