I have .NET program that can\'t be run from Visual Studio for some reasons (Excel file created from an Excel 2010 template project) for which I need to debug startup events.
You can start the debugger from your code via
public static void Main(string[] args)
{
System.Diagnostics.Debugger.Launch();
}
But don't for get to remove this line before shipping your application. Maybe you want to use compiler flags to be sure:
public static void Main(string[] args)
{
#if debug
System.Diagnostics.Debugger.Launch();
#endif
}