Name

IsDebuggingEnabled

Synopsis

Boolean = Context.IsDebuggingEnabled

Returns a Boolean value specifying whether debugging is enabled for the current request.

Parameters

Boolean

A Boolean variable to receive value of this flag.

Example

The example displays True if debugging enabled; otherwise, it displays False:

Sub Page_Load(  )
   Message.Text = "Debugging Enabled?" & _
      Context.IsDebuggingEnabled
End Sub

Notes

This flag is controlled by the compilation section in web.config. If the compilation section’s debug attribute is set to True, IsDebuggingEnabled returns True. If the debug attribute in the compilation section is set to False, this property is False.

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.