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 show a MessageBox, this would block the application, then you attach or reattach the debugger to the process and click ok to continue:
MessageBox.Show("Attach process to debugger and click ok!");
you can add it to the Form constructor (if you use winforms), so this would be executed before anything else, except for the initialization of components:
public MainForm()
{
InitializeComponent();
MessageBox.Show("Attach process to debugger and click ok!");
}
When you finish your debugging, comment out that line.