Why does not the Application_Start() event fire when I debug my ASP.NET MVC app?

后端 未结 12 1480
独厮守ぢ
独厮守ぢ 2021-01-30 16:01

I currently have the following routines in my Global.asax.cs file:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRout         


        
12条回答
  •  借酒劲吻你
    2021-01-30 16:22

    Add a System.Diagnostics.Debugger.Break(); to Application_Start().
    This will force a breakpoint.

    This line should be commented out to avoid the breakpoint to happern and #ifdef debug to get sure never gets to production.

提交回复
热议问题