Re: private fields of component show up in debugger

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Hairlip,

Thanks for your reply.

I'm afraid there is no definite means to prevent debugger from getting the
private members of the classes in your assemblies(Even VS debugger can let
you configure this, other debuggers still can view it if they want).
Actually, you can use the reflector tools to open any .NET managed
assmblies and inspect the class members(public or private ), correct? This
has also indicated this. Actually, managed application's nature (has rich
metadata that describe the program and data's structure...) make debuger or
disassemble tools very easy to inspect the code. If you do want to hide
such info, what you need is some code protection/obfuscate tools as Pete
has suggested. Here are some web reference mentioned such tools

#How-To-Select an Obfuscation Tool for .NET
http://www.howtoselectguides.com/dotnet/obfuscators/

#Code protection - Obfuscation
http://sharptoolbox.com/categories/code-protectors-obfuscators

and VS 2005 Team suite has provided the Dotfuscator Community Edition:

#Dotfuscator Community Edition 3.0
http://msdn2.microsoft.com/en-us/library/ms227240(VS.80).aspx

Anyway, debugging tools will never take care of those "public" or "private"
accessors(only compiler will take care of them). As long as data are in
memory and hasn't been obfuscated, debugger can watch them out.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

.