I got a break point on the first line of Application_Start()
, but Visual Studio wont break on it.
Visual Studio have attached itself to the IIS working proc
I've got around this problem before by doing this:
Now open your solution and give it a shot. (keep your fingers crossed :))
Place this line in your Application_Start().
Debugger.Break();
This will present you with a dialog which will allow you to select a debugger. You might need to restart the application pool.
If using IISEXPRESS is not an option, as @David Perlman mentions, I would go for a Logger. Log4Net or NLog are both good. It's good to have a logger in the longrun, for instance in production environments.
namespace DataService
{
using NLog;
public class Global : System.Web.HttpApplication
{
private Logger log;
protected void Application_Start(object sender, EventArgs e)
{
LogManager.LoadConfiguration("nlog.config");
log = LogManager.GetCurrentClassLogger();
log.Error($"Read this line in the log specified in nlog.config");
}