harschell / obfuscar

Automatically exported from code.google.com/p/obfuscar
0 stars 0 forks source link

Debugging obfuscated code? #25

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Setup:
Visual Studio 2008 debugger.

What steps will reproduce the problem?
1. Use the obfuscar to obfuscate assemblies
2. Start the program with the obfuscated assemblies. Some of the
functionality is missing, because some code branches cannot be found due to
obfuscation.
3. How do I debug to find what needs to be explicitly skipped from
obfuscation in the xml config file? Can I use mapping.txt somehow?

What is the expected output? What do you see instead?
Cannot debug obfuscated files.

What version of the product are you using? On what operating system?
1.5.something, latest version as of 1/2/10. Win XP SP3.

Please provide any additional information below.

Original issue reported on code.google.com by radun...@gmail.com on 2 Jan 2010 at 7:56

GoogleCodeExporter commented 8 years ago
It would be very hard to support debugging of obfuscated assemblies. Even if 
.pdb
files could be created to reflect the type and member name changes, the original
source code would also have to be parsed and patched accordingly.
Nearly all problems with obfuscated assemblies lead to a stack trace. The 
mapping.txt
file can be used to translate the obfuscated type and member names in this 
trace to
the original names.
Most of the time this gives the decisive hint which type or member to exclude 
from
obfuscation. You can also narrow down the class or member type (field, property,
method, or event) by trial and error.
In general serialization, binding (e.g. in Windows Form), reflection, and some
VS-generated code lead to most of the issues with obfuscation. Some of them can 
be
worked around without exclusion of classes or members from obfuscation.

Original comment by webbi...@gmail.com on 3 Jan 2010 at 7:16

GoogleCodeExporter commented 8 years ago
Yes, you're right, it would be difficult to support. At any rate, I narrowed my
problem to the data binding I was doing in my app. Skipping the obfuscation of 
the
properties that were data-bound fixed my obfuscation issues. Thanks for your 
reply.

Original comment by radun...@gmail.com on 3 Jan 2010 at 11:30

GoogleCodeExporter commented 8 years ago

Original comment by webbi...@gmail.com on 9 Feb 2010 at 6:43