You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/RhetosCli/Program.cs
+36-11
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ You should have received a copy of the GNU Affero General Public License
26
26
usingSystem;
27
27
usingSystem.Collections.Generic;
28
28
usingSystem.CommandLine;
29
+
usingSystem.Diagnostics;
29
30
usingSystem.IO;
30
31
usingSystem.Linq;
31
32
usingSystem.Threading.Tasks;
@@ -93,28 +94,38 @@ enum VerbosityLevel
93
94
publicstaticintRun(string[]args)
94
95
{
95
96
varverbosityOption=newOption<VerbosityLevel>("--verbosity",()=>VerbosityLevel.Normal,"Output verbosity level. Allowed values are normal and diagnostic.");
96
-
vartraceOption=newOption<string[]>("--trace",()=>Array.Empty<string>(),"Output additional trace loggers specified by name.");
97
+
vartraceOption=newOption<string[]>("--trace","Output additional trace loggers specified by name.");
97
98
varmsbuildFormatOption=newOption<bool>("--msbuild-format",()=>false,"Adjust error output format for MSBuild integration.");
99
+
varstartPausedOption=newOption<bool>("--start-paused","Start paused, to allow attaching a debugger. Works only on interactive environment.");
98
100
varrootCommand=newRootCommand
99
101
{
100
102
verbosityOption,
101
103
traceOption,
102
-
msbuildFormatOption
104
+
msbuildFormatOption,
105
+
startPausedOption,
103
106
};
104
107
105
-
// Using 'CurrentDirectory' by default, because rhetos.exe on *build* is expected to be located in NuGet package cache.
106
-
varprojectRootFolderArgument=newArgument<DirectoryInfo>("project-root-folder",()=>newDirectoryInfo(Environment.CurrentDirectory)){Description="Project folder where csproj file is located. If not specified, current working directory is used by default."};
108
+
//===============================================
109
+
// 'build' command:
110
+
111
+
// Using CurrentDirectory by default, because rhetos.exe on *build* is expected to be located in NuGet package cache.
112
+
varprojectRootFolderArgument=newArgument<DirectoryInfo>("project-root-folder",()=>newDirectoryInfo(Environment.CurrentDirectory)){Description="Project folder where .csproj file is located. If not specified, current working directory is used by default."};
107
113
varbuildCommand=newCommand("build","Generates C# code, database model file and other project assets.")
varstartupAssemblyArgument=newArgument<FileInfo>("startup-assembly"){Description="Startup assembly of the host application."};
119
130
varshortTransactionsOption=newOption<bool>("--short-transactions","Commit transaction after creating or dropping each database object.");
120
131
varskipRecomputeOption=newOption<bool>("--skip-recompute","Skip automatic update of computed data with KeepSynchronized. See output log for data that needs updating.");
@@ -132,19 +143,33 @@ public static int Run(string[] args)
Console.WriteLine($"Attach the debugger to process '{currentProcess.MainModule?.ModuleName}' ({currentProcess.Id}) and press any key to continue ...");
0 commit comments