For .NET Reflector 10 Extension in Visual Studio 2017 - How to Disable Obfuscation During Debugging

MikeDevMikeDev Posts: 3 New member
edited October 4, 2018 11:25AM in .NET Reflector

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.


Tagged:

Best Answer

  • Russell DRussell D Posts: 1,324 Diamond 5
    edited October 22, 2018 7:46AM Answer ✓
    This 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

  • If your binaries are obfuscated then thats what Reflector will report. If you want to debug your own application using the original source code, then simply don't obfuscate it.

    There's no way to just swap the source codes/pdb. The obfuscated assembly and original assembly are two entirely different assemblies.
    Have you visited our Help Centre?
  • MikeDevMikeDev Posts: 3 New member

    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?

  • MikeDevMikeDev Posts: 3 New member
    I am all clear now. Thank you.
Sign In or Register to comment.