A simple way to break in
Application_Start()
is to use the System.Diagnostics.Debugger
class. You can force the application to break by inserting System.Diagnostics.Debugger.Break() where you would like the debugger to break.
void Application_Start(object sender, EventArgs e)
{
System.Diagnostics.Debugger.Break();
}
Or else
- Attach the debugger to the IIS process.
- Open the global.asax file and put in a break point.
- Add a space to the web.config file and save the file (this causes the current web application to reset);
- Refresh / goto a web page on the site.
- Boom debugger stops at your break-point. :)
