Context.IsDebuggingEnabled
<%@ Page Language="vb" debug="false" %> <html> <head> <script runat="server"> Sub Page_Load() Message.Text = "Debugging Enabled? " & Context.IsDebuggingEnabled End Sub </script> </head> <body> <asp:label id="Message" runat="server"/> </body> </html>