In ASP.NET MVC you can use
HttpContext.Current.IsDebuggingEnabled
To determine if there is debug="true"a web.config file.
debug="true"
How to do this without reference to the HttpContext?
You must read the configuration manually as follows:
var compilation = (CompilationSection)ConfigurationManager.GetSection("system.web/compilation"); if (compilation.Debug) { //Debug is on! }
Source: https://habr.com/ru/post/1542009/More articles:How to avoid maximum channels per tcp connection with amqp php, persistent connections and php-fpm - phpSublimelinter (PC): how to call this shortcut ("Lint This View"): Ctrl K, l? - sublimetext3VBA Removing Special Characters - vbaTrack onBlur event for parent div only - javascriptHow does Windows interpret multiple VersionInfo resources? - windowsRedactor editor changes image tag at startup - javascriptThe function call MemoryStream.GetBuffer () is executed even after MemoryStream.Close (); What for? - garbage-collectionПоиск первых образцов, превышающих пороговое значение, эффективно в Python (и сравнение MATLAB) - pythonHow to name a Q promise as part of a promise chain - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1542015/when-non-blocking-io-is-turned-on-for-stdout-is-it-correct-for-the-os-to-turn-it-on-for-stdin-too&usg=ALkJrhjB9KlL2aWs6KU2dPHQ0YvrjOishAAll Articles