는 다음을 사용할 수 있습니다
if (!HttpContext.Current.IsDebuggingEnabled)
Script = OptimizeScript(Script);
은 또한 ..... 더 주제를 논의보다는 의견의 몇 가지가 있습니다.
이 윌코 Bauwer에서 그는이 속성은 Web.config의 설정을 캡슐화하고 계정에 페이지 레벨 디버깅을하지 않는 코멘트와 당신이 ....
bool isDebuggingEnabled = Assembly.GetExecutingAssembly().IsDefined(typeof(DebuggableAttribute));
원한다면 ....이 그것을 달성하는 애인입니다 !!
및 Peter Bromberg (C# MVP)는 Global_asax.cs 파일과 Application_Start 이벤트에 설정된 정적 전역 응용 프로그램 플래그를 사용하는 다른 솔루션을 제공합니다.
public static bool IsDebugMode = false;
protected void Application_Start(object sender, EventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached) IsDebugMode = true;
내가 피터 브롬 버그의 마지막 접근 방식을 사용하고 대해 AuthenticateRequest 방법에 추가
Steves blog
에서 촬영. 이 기능은 응용 프로그램이 실행 중일 때 디버거를 연결할 때 도움이됩니다. 감사합니다. – Zuber
도움이 되었으면 좋았습니다. :) – Bipul