Tuesday, June 22, 2010

Release vs. Debug Mode

When you compile your application in release mode debug information is not generated and this is the option normally used when you want to deploy your application to client.debug mode is heavy since debugging info gets generated and is used while development to find out error in your code.

When we are moving code to production then we make the mode as Release. Because there no debug is required and the execution also very fast in this mode due to the .pdb file formation will not happens.
You use the Debug and Release settings to control what happens when you build your application. You should use the Release setting when you're building for production and will not need to debug the application. When you build the application in Release mode, the debug symbols are not baked into the assembly, so you cannot debug it using Visual Studio .NET or other source code debuggers. What's cool is that the code is also optimized during this build operation. And, all calls to Debug class methods in your code are disabled while calls to Trace class methods are left.
Of course, when you compile in Debug mode, the application can be debugged at the source level and you have all the power of Visual Studio .NET and other source-level debug tools at your disposal. Obviously, code compiled in Debug mode does not perform quite as well as Release-mode code does.

No comments:

Post a Comment