Skip to content

Commit 8e662aa

Browse files
committed
Switch to -gdbg for debug, reduce conflict chances
1 parent c8e912e commit 8e662aa

2 files changed

Lines changed: 13 additions & 20 deletions

File tree

src/go/Program.cs

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99
app.Add<CleanupCommands>();
1010
await app.RunAsync(GoArgs.Normalize(args));
1111

12-
/// <summary>
13-
/// Runs a file-based .NET app from a .cs entrypoint.
14-
/// </summary>
12+
/// <summary>Runs a file-based .NET app from a .cs entrypoint.</summary>
1513
/// <param name="input">Path to an existing .cs file or remote ref (owner/repo[@ref][:path]).</param>
1614
/// <param name="r2r">Publish with ReadyToRun instead of native AOT; supports more dynamic .NET features while keeping most publish optimizations. </param>
17-
/// <param name="goDebug">Launch debugger before executing.</param>
15+
/// <param name="gdbg">Launch debugger before executing.</param>
1816
/// <param name="extraArgs">Arguments before '--' are passed to 'dotnet publish'; arguments after '--' are forwarded to the published app. Without '--', all extra arguments are forwarded to the published app.
1917
/// </param>
20-
static async Task<int> RunAsync([Argument] string input, bool r2r = false, [Hidden] bool goDebug = false, [Argument] params string[] extraArgs)
18+
static async Task<int> RunAsync([Argument] string input, bool r2r = false, [Hidden] bool gdbg = false, [Argument] params string[] extraArgs)
2119
{
22-
if (goDebug)
20+
if (gdbg)
2321
System.Diagnostics.Debugger.Launch();
2422

2523
var source = await GetEffectiveSourceAsync(input);
@@ -52,15 +50,13 @@ state.App is not null &&
5250
return await ExecuteAppAsync(publishDir, () => ProcessRunner.RunAsync(state.App, appArgs));
5351
}
5452

55-
/// <summary>
56-
/// Deletes cached publish artifacts for a file-based .NET app, or for a remote ref: deletes the bundle and also its associated publish artifacts for every previously-used path recorded in the bundle's ETags/Entry (:path on the ref is ignored).
57-
/// </summary>
53+
/// <summary>Deletes cached publish artifacts for a file-based .NET app, or for a remote ref.</summary>
5854
/// <param name="input">Path to an existing .cs file or remote ref (owner/repo[@ref][:path]).</param>
5955
/// <param name="all">Delete cached artifacts for all apps instead.</param>
60-
/// <param name="goDebug">Launch debugger before executing.</param>
61-
static int CleanAsync([Argument] string? input = null, [Hidden] bool all = false, [Hidden] bool goDebug = false)
56+
/// <param name="gdbg">Launch debugger before executing.</param>
57+
static int CleanAsync([Argument] string? input = null, bool all = false, [Hidden] bool gdbg = false)
6258
{
63-
if (goDebug)
59+
if (gdbg)
6460
System.Diagnostics.Debugger.Launch();
6561

6662
if (all)
@@ -144,17 +140,15 @@ static int CleanAsync([Argument] string? input = null, [Hidden] bool all = false
144140
return AppCleaner.Clean(pdir, stmp);
145141
}
146142

147-
/// <summary>
148-
/// Runs a file-based .NET app from a .cs entrypoint using dotnet run for fast iteration.
149-
/// </summary>
143+
/// <summary>Runs a file-based .NET app from a .cs entrypoint using dotnet run for fast iteration.</summary>
150144
/// <param name="input">Path to an existing .cs file or remote ref (owner/repo[@ref][:path]).</param>
151145
/// <param name="r2r">Accepted for consistency (ignored for dev which uses dotnet run).</param>
152-
/// <param name="goDebug">Launch debugger before executing.</param>
146+
/// <param name="gdbg">Launch debugger before executing.</param>
153147
/// <param name="extraArgs">Arguments before '--' are passed to 'dotnet run'; arguments after '--' are forwarded to the app. Without '--', all extra arguments are forwarded to the app.
154148
/// </param>
155-
static async Task<int> DevAsync([Argument] string input, [Hidden] bool r2r = false, [Hidden] bool goDebug = false, [Argument] params string[] extraArgs)
149+
static async Task<int> DevAsync([Argument] string input, [Hidden] bool r2r = false, [Hidden] bool gdbg = false, [Argument] params string[] extraArgs)
156150
{
157-
if (goDebug)
151+
if (gdbg)
158152
System.Diagnostics.Debugger.Launch();
159153

160154
var source = await GetEffectiveSourceAsync(input);

src/go/Properties/launchSettings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"profiles": {
33
"go": {
44
"commandName": "Project",
5-
"commandLineArgs": "showcase.cs --foo bar --bar true",
6-
"workingDirectory": "..\\..\\samples\\file-based-apps"
5+
"commandLineArgs": "kzu/runfile@v1:run.cs -gdbg"
76
}
87
}
98
}

0 commit comments

Comments
 (0)