Attach a process for debugging in Visual Studio

2019-06-14 15:20发布

I am hosting an application on IIS but application gets up very late when I restart IIS. So I want to debug it at the begining of the application start but I cannot attach a process if the application doesnt start. so what is the proper way to debug an application that is host on IIS when the application firstly begin ?

2条回答
疯言疯语
2楼-- · 2019-06-14 15:49

How about put a Debugger.Launch() in Global.Application_Start

查看更多
小情绪 Triste *
3楼-- · 2019-06-14 15:57

One way is to select Start Debugging from the Debug menu in Visual Studio.

Another way is to add a System.Diagnostics.Debug.Fail("test") to the location within the code that you want to break, then reset IIS and attach to IIS from VS.

查看更多
登录 后发表回答