For .NET Reflector 10 Extension in Visual Studio 2017 - How to Disable Obfuscation During Debugging
I recently installed this extension. It is letting me step into the source code of dlls the source of which I own. Unfortunately I see the code I am stepping into has been obfuscated. This defeats the purpose of my having installed this extension.
I have not been able to find a way to disable this obfuscation. I need to be able to do this in order to understand what I am actually debugging, set watch variables correctly, etc. How can I go about doing disabling this obfuscation?
I have the original source code, dlls and pdb files for what I want to step into. Perhaps I can copy them to a location that .NET Reflector will accept and refer to.
Best Answer
-
Russell D Posts: 1,324 Diamond 5This is what is unclear about the situation so it probably needs more information.
Reflector won't report code as obfuscated if it isn't obfuscated, it translates what it sees. The "Generated by .NET REflector" with unclear code is Reflectors best guess at translating obfuscated code, which it can't always get right.Have you visited our Help Centre?
Answers
There's no way to just swap the source codes/pdb. The obfuscated assembly and original assembly are two entirely different assemblies.
Thank you for your response.
I believe my original binaries are not obfuscated. I am debugging a service that steps into a dll of mine which I have set to "Enable Debugging".
When I step into the method of the dll I see obfuscated code. At the top there is "Generated by .NET Reflector" and in the method there are lines such as:
<>c__DisplayClass19_0 class_;
ParameterExpression expression;
ParameterExpression expression2;
I may be doing something wrong. Is there was way to just step into my original code, or else have the .NET Reflector code be non-obfuscated?