Obfuscation makes reverse engineering more difficult by modifying assemblies while preserving their behavior. As a result, debugging protected applications also requires additional tools and information.
For example:
- Control Flow Obfuscation changes the structure of compiled methods, making them more difficult to follow in a debugger.
- Renaming replaces original type and member names with obfuscated identifiers, causing stack traces to contain obfuscated names.
Dotfuscator provides features that help you debug protected applications during development and diagnose issues reported from production.
Debugging with Symbols
Dotfuscator can generate debugging symbols (such as PDB files) for protected assemblies.
These symbols allow you to use a debugger to step through an obfuscated assembly and hit breakpoints against the original source code.
For new configurations, generation of debugging symbols is enabled by default. This allows you to integrate Dotfuscator into your build process while continuing to debug obfuscated builds during development.
Security Considerations
Debugging symbols contain information about your original source code.
Do not distribute PDB files or other debugging symbols with production releases, as they can provide information that assists reverse engineering.
Translating Obfuscated Stack Traces
When Renaming is enabled, stack traces generated by a protected application contain obfuscated type and member names.
To translate these stack traces back to their original names, Dotfuscator provides a Stack Trace Decoder. Developers who do not have Dotfuscator installed can use the standalone Lucidator utility to perform the same translation.
Both tools require the renaming map file that Dotfuscator generates during the protection process.
For this reason, you should archive the map file for every production release so that you can decode stack traces reported by users.
Best Practices
- Test obfuscated builds before releasing them.
- Store map files securely for every released version of your application.
- Keep debugging symbols separate from production deployments.
- Use the map file that corresponds to the exact version of the protected application when decoding stack traces.