File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ type Flag =
1111 | Force
1212 | OnlyCheck
1313 | Verbose
14+ | Debug
1415
1516type ProvidedCommandLineArguments =
1617 {
@@ -86,6 +87,8 @@ module Program =
8687 Console.WriteLine()
8788 Console.WriteLine " Options"
8889
90+ Console.WriteLine " -d, --debug Show debugging information"
91+
8992 Console.WriteLine
9093 " -f, --force Always generate binaries again even if existing binaries are new enough"
9194
@@ -111,6 +114,8 @@ module Program =
111114 Some OnlyCheck
112115 elif arg = " -v" || arg = " --verbose" then
113116 Some Verbose
117+ elif arg = " -d" || arg = " --debug" then
118+ Some Debug
114119 elif arg.StartsWith " -" then
115120 failwithf " Flag not recognized: %s " arg
116121 else
@@ -944,6 +949,23 @@ let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() }
944949
945950 let verbose = parsedArgs.Flags.Contains Flag.Verbose
946951
952+ let debug = parsedArgs.Flags.Contains Flag.Debug
953+
954+ if debug then
955+ let cmdLineArgs = Environment.GetCommandLineArgs()
956+
957+ Console.WriteLine(
958+ sprintf
959+ " DEBUG: __SOURCE_FILE__: %s "
960+ __ SOURCE_ FILE__
961+ )
962+
963+ Console.WriteLine(
964+ sprintf
965+ " DEBUG: Env.CmdLineArgs: %s "
966+ ( String.Join( " ," , cmdLineArgs))
967+ )
968+
947969 let scriptContents , lastWriteTimeOfSourceFiles =
948970 GetParsedContentsAndOldestLastWriteTimeFromScriptOrItsDependencies
949971 parsedArgs.Script
You can’t perform that action at this time.
0 commit comments