Click here to Skip to main content
15,881,711 members
Please Sign up or sign in to vote.
4.00/5 (4 votes)
See more:
Hi Experts,

I have certain doubts on dlls. Can anyone help me on this.?
1. What is the Difference between a Debug Dll and Release Dll.
2. If I have a Debug Dll, how it helps while running the application. Also how I can identify a particular dll is release dll or debug dll.

Thanks and Regards

Arun
Posted

I think you are referring to Microsoft.Net assemblies. The biggest difference is performance. In a debug dll several extra instructions are added to enable you to set a breakpoint on every source code line in for example Visual Studio. Also the code will not be optimized, againg to enable you to debug the code.

In the release version these extra instructions are removed and several extra optimizations are done by the compiler. Try for example debugging a release compiled assembly in visual studio, you will notice that you are not allowed to set a breakpoint on each and every line.

As for the identifying part I am not sure, maybe you could see it using ildasm and check of the extra instructions such as nop are there.
 
Share this answer
 
Comments
RaviRanjanKr 3-May-11 4:41am    
Nice Answer,My 5 :)
Arun India 3-May-11 6:19am    
Thanks for your reply. Can you share some more information about how to use debug Dll.(How to debug/ How to get debug information.?)
Patrick Kalkman 4-May-11 1:47am    
You use a debug dll the same way as a release dll, there is no difference in functionality. Normally, when you have a dll which is compiled in debug mode you have a corresponding pdb (program database) file. This pdb file contains information that enables a program such as a debugger to map the generated il (intermediate language) to your c# source code line number. But it also contains the names of your local variables.
Arun India 4-May-11 4:58am    
Thanks Patrick.. My 5
Prasanta_Prince 4-May-11 8:19am    
Good one. 5 from me.
Hope this[^] might help you.
 
Share this answer
 
Comments
Olivier Levrey 3-May-11 6:01am    
It seems there is some kind of heavy "1 attack" here...
Compensated by voting 5.
[no name] 3-May-11 7:01am    
Thanks Olivier Levrey.
Arun India wrote:
   1. What is the Difference between a Debug Dll and Release Dll.

Answer 1) if it conatains xml files of pdb files with dlls then it is in debug mode otherwise it is in release mode.
Arun India wrote:
   2. If I have a Debug Dll, how it helps while running the application. Also how I can identify a particular dll is release dll or debug dll.

Answer 2)The assembly information include in the DLL files will store whether it is compiled in deug or release mode.
Here is a Third-party software for getting assembly info:
.NET Assembly Information[^]

Reference Link-[The difference between debug & release Dll] [^]
 
Share this answer
 
v2
Comments
Olivier Levrey 3-May-11 6:02am    
It seems there is some kind of heavy "1 attack" here...
Compensated by voting 5.
Patrick Kalkman 3-May-11 6:16am    
Good link to a tool that shows debug or release dll, didn't knew that :-), 5 points from me.
In one word, it's optimization. Debug mode dll's are not optimized and Release mode dll's are.
Having full data and nothing optimized helps you in debugging (used by developers) and providing minimal data in optimized form avoids any extra(non-needed) data to the end user.

Here, have a read:
MSDN: Details & How to: Set Debug and Release Configurations[^]
What's the difference between a Debug vs Release Build?[^]

If needed, look here[^] for more.
 
Share this answer
 
Comments
Olivier Levrey 3-May-11 6:01am    
It seems there is some kind of heavy "1 attack" here...
Compensated by voting 5.
Sandeep Mewara 3-May-11 7:17am    
Oh! Right... here is my 5 to compensate. :)
Arun India 3-May-11 6:16am    
Thank you for your reply. Ok.. I agreed that Debug Dlls are not optimized code. Then if I have a debug mode dll how I can use it?(How to debug the dll)?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900