diff --git a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs index c3972e29d9..6fa44d2523 100644 --- a/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs +++ b/Source/RunActivity/Viewer3D/Processes/GameStateRunActivity.cs @@ -231,7 +231,7 @@ internal override void Load() default: MessageBox.Show("To start " + Application.ProductName + ", please run 'OpenRails.exe'.\n\n" + "If you are attempting to debug this component, please run 'OpenRails.exe' and execute the scenario you are interested in. " - + "In the log file, the command-line arguments used will be listed at the top. " + + "In the log file, a line with the command-line arguments used will be listed at the top. " + "You should then configure your debug environment to execute this component with those command-line arguments.", Application.ProductName + " " + VersionInfo.VersionOrBuild); Game.Exit(); @@ -819,6 +819,21 @@ void InitLogging(UserSettings settings, string[] args, bool appendLog) Console.WriteLine("Executable = {0}", Path.GetFileName(Application.ExecutablePath)); foreach (var arg in args) Console.WriteLine("Argument = {0}", arg); + + string debugArgline = ""; + foreach (var arg in args) + { + if (arg.Contains(" ")) + { + debugArgline += "\"" + arg + "\" "; + } + else + { + debugArgline += arg + " "; + } + } + Console.WriteLine("Arguments = {0}", debugArgline.TrimEnd()); + LogSeparator(); settings.Log(); LogSeparator();