mirror of
https://github.com/actions/runner.git
synced 2026-03-16 09:23:24 -04:00
PR feedback
This commit is contained in:
@@ -192,10 +192,11 @@ namespace GitHub.Runner.Worker.Dap
|
||||
var capabilities = new Capabilities
|
||||
{
|
||||
SupportsConfigurationDoneRequest = true,
|
||||
SupportsEvaluateForHovers = true,
|
||||
|
||||
// All other capabilities are false for MVP
|
||||
SupportsFunctionBreakpoints = false,
|
||||
SupportsConditionalBreakpoints = false,
|
||||
SupportsEvaluateForHovers = true,
|
||||
SupportsStepBack = false,
|
||||
SupportsSetVariable = false,
|
||||
SupportsRestartFrame = false,
|
||||
@@ -880,9 +881,7 @@ namespace GitHub.Runner.Worker.Dap
|
||||
return value ?? string.Empty;
|
||||
}
|
||||
|
||||
return _variableProvider?.MaskSecrets(value)
|
||||
?? HostContext?.SecretMasker?.MaskSecrets(value)
|
||||
?? value;
|
||||
return HostContext?.SecretMasker?.MaskSecrets(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -195,7 +195,13 @@ namespace GitHub.Runner.Worker
|
||||
Trace.Warning($"Failed to start DAP debugger: {ex.Message}. Job will continue without debugging.");
|
||||
|
||||
// cleanup if debugger failed to start
|
||||
try { await dapDebugger?.StopAsync(); } catch { }
|
||||
try {
|
||||
await dapDebugger.StopAsync();
|
||||
}
|
||||
catch {
|
||||
Trace.Error("Failed to stop debugger server")
|
||||
Trace.Error(ex);
|
||||
}
|
||||
dapDebugger = null;
|
||||
}
|
||||
}
|
||||
@@ -250,16 +256,15 @@ namespace GitHub.Runner.Worker
|
||||
{
|
||||
await dapDebugger.WaitUntilReadyAsync(jobRequestCancellationToken);
|
||||
}
|
||||
catch (OperationCanceledException) when (jobRequestCancellationToken.IsCancellationRequested)
|
||||
{
|
||||
Trace.Info("Job was cancelled before debugger client connected. Continuing without debugger.");
|
||||
try { await dapDebugger.StopAsync(); } catch { }
|
||||
dapDebugger = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Trace.Warning($"Failed to complete DAP handshake: {ex.Message}. Job will continue without debugging.");
|
||||
try { await dapDebugger.StopAsync(); } catch { }
|
||||
try {
|
||||
await dapDebugger.StopAsync();
|
||||
}
|
||||
catch {
|
||||
Trace.Error("Failed to stop debugger server")
|
||||
Trace.Error(ex);
|
||||
}
|
||||
dapDebugger = null;
|
||||
}
|
||||
}
|
||||
@@ -306,7 +311,13 @@ namespace GitHub.Runner.Worker
|
||||
|
||||
if (dapDebugger != null)
|
||||
{
|
||||
await dapDebugger.StopAsync();
|
||||
try {
|
||||
await dapDebugger.StopAsync();
|
||||
}
|
||||
catch {
|
||||
Trace.Error("Failed to stop debugger server")
|
||||
Trace.Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
await ShutdownQueue(throwOnFailure: false);
|
||||
|
||||
Reference in New Issue
Block a user