ASP.NET Debug Enabled

Introduction

ASP.NET allows remote debugging of web applications by enabling the debug option on the application. It is recommended to disable debug mode before deploying a production application. By default, debugging is disabled, and although debugging is frequently enabled to troubleshoot a problem, it is also frequently not disabled again after the problem is resolved.

Applications that run with debug mode on, will experience performance issue because all client-javascripts and static images will be downloaded each time the application is loaded. Also, there will be more files in temporary ASP.net files folder. Besides that, the System.Diagnostics.DebuggableAttribute will be added to each page, causing a performance slowdown.

How to test

  • Open web.config file

  • You can see debug=’true’ in the element within the section.

How to Fix

To disable debugging, open the Web.config file for the application, and find the element within the section. Set the debug attribute to "false" as shown in the below screenshot.

Last updated

Was this helpful?