Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What the difference between Debug and Release in ScriptManagers's ScriptMode?

In ASP.NET AJAX, I can set ScriptMode for ScriptManager. The script mode can be Debug or Release. What are the exact differences between them? Is it true that on debug mode, generated scripts won't cache on the browser while in Release mode they will be cached, and subsequent server access will be prevented?

like image 503
ml123 Avatar asked Jun 23 '11 07:06

ml123


1 Answers

Refering to ScriptManager.ScriptMode Property:

In Debug mode, debug versions of client script libraries are used in the Web page unless the retail attribute of the deployment configuration element is set to true.

In Release mode, release versions of client script libraries are used in the Web page unless the retail attribute of the deployment configuration element is set to false.

Refering to Debugging and Tracing Ajax Applications Overview:

The Microsoft Ajax architecture provides a model for release and debug modes. Release mode provides error checking and exception handling that is optimized for performance, with minimized script size. Debug mode provides more robust debugging features, such as type and argument checking. If you create debug versions of client script files or script resources, ASP.NET runs the debug versions when the application is in debug mode. This enables you to throw exceptions in debug scripts but still keep the size of release code to a minimum.

like image 108
Akram Shahda Avatar answered Oct 09 '22 01:10

Akram Shahda