I want to debug a program in Visual Studio 2008. The problem is that it exits if it doesn't get arguments. This is from the main method:
if (args == null || args.Length != 2 || args[0].ToUpper().Trim() != "RM")
{
Console.WriteLine("RM must be executed by the RSM.");
Console.WriteLine("Press any key to exit program...");
Console.Read();
Environment.Exit(-1);
}
I don't want to comment it out and and then back in when compiling. How can I start the program with arguments when debugging? It is set as the StartUp Project.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…