diff --git a/documentation/learningPath/aks.md b/documentation/learningPath/aks.md index cb0a80ff678..a6446952e07 100644 --- a/documentation/learningPath/aks.md +++ b/documentation/learningPath/aks.md @@ -42,7 +42,7 @@ ENV \ # Unset ASPNETCORE_HTTP_PORTS from aspnet base image (.NET 8+) ASPNETCORE_HTTP_PORTS= \ # Disable debugger and profiler diagnostics to avoid diagnosing self. - COMPlus_EnableDiagnostics=0 \ + DOTNET_EnableDiagnostics=0 \ # Default Filter DefaultProcess__Filters__0__Key=ProcessId \ DefaultProcess__Filters__0__Value=1 \ diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/DumpTestUtilities.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/DumpTestUtilities.cs index 859ffdd9adf..53ab302a7c4 100644 --- a/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/DumpTestUtilities.cs +++ b/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/DumpTestUtilities.cs @@ -15,7 +15,7 @@ namespace Microsoft.Diagnostics.Monitoring.TestCommon { public static class DumpTestUtilities { - public const string EnableElfDumpOnMacOS = "COMPlus_DbgEnableElfDumpOnMacOS"; + public const string EnableElfDumpOnMacOS = "DOTNET_DbgEnableElfDumpOnMacOS"; public static async Task ValidateDump(bool expectElfDump, Stream dumpStream) { diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/Runners/AppRunner.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/Runners/AppRunner.cs index 5789a1caa9c..73ef5c3937b 100644 --- a/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/Runners/AppRunner.cs +++ b/src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/Runners/AppRunner.cs @@ -153,7 +153,7 @@ public async Task StartAsync(CancellationToken token, bool waitForReady = true) _runner.Arguments = fullScenarioName; // Enable diagnostics in case it is disabled via inheriting test environment. - _adapter.Environment.Add("COMPlus_EnableDiagnostics", "1"); + _adapter.Environment.Add("DOTNET_EnableDiagnostics", "1"); if (ConnectionMode == DiagnosticPortConnectionMode.Connect) { diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Runners/MonitorRunner.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Runners/MonitorRunner.cs index f7068a34d46..1da8ae844a7 100644 --- a/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Runners/MonitorRunner.cs +++ b/src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests/Runners/MonitorRunner.cs @@ -145,7 +145,7 @@ public virtual async Task StartAsync(string command, string[] args, Cancellation _runner.Arguments = string.Join(" ", argsList); // Disable diagnostics on tool - _adapter.Environment.Add("COMPlus_EnableDiagnostics", "0"); + _adapter.Environment.Add("DOTNET_EnableDiagnostics", "0"); // Console output in JSON for easy parsing _adapter.Environment.Add("Logging__Console__FormatterName", "json"); // Enable Information on ASP.NET Core logs for better ability to diagnose issues. diff --git a/src/Tools/dotnet-monitor/ParameterCapturing/CaptureParametersOperation.cs b/src/Tools/dotnet-monitor/ParameterCapturing/CaptureParametersOperation.cs index 5691e60fe95..dd0b7910471 100644 --- a/src/Tools/dotnet-monitor/ParameterCapturing/CaptureParametersOperation.cs +++ b/src/Tools/dotnet-monitor/ParameterCapturing/CaptureParametersOperation.cs @@ -106,8 +106,7 @@ static Exception getNotAvailableException(string reason) throw getNotAvailableException(Strings.ParameterCapturingNotAvailable_Reason_StartupHookDidNotLoad); } - const string EditAndContinueEnvName = "COMPLUS_ForceEnc"; - if (env.TryGetValue(EditAndContinueEnvName, out string? editAndContinueEnvValue) && + if ((env.TryGetValue("DOTNET_ForceEnc", out string? editAndContinueEnvValue) || env.TryGetValue("COMPlus_ForceEnc", out editAndContinueEnvValue)) && ToolIdentifiers.IsEnvVarValueEnabled(editAndContinueEnvValue)) { // Having Enc enabled results in methods belonging to debug modules to silently fail being instrumented. diff --git a/src/Tools/dotnet-monitor/RuntimeInfo.cs b/src/Tools/dotnet-monitor/RuntimeInfo.cs index d739384147a..2b24952e59b 100644 --- a/src/Tools/dotnet-monitor/RuntimeInfo.cs +++ b/src/Tools/dotnet-monitor/RuntimeInfo.cs @@ -11,7 +11,7 @@ public static bool IsDiagnosticsEnabled { get { - string? enableDiagnostics = Environment.GetEnvironmentVariable("COMPlus_EnableDiagnostics"); + string? enableDiagnostics = Environment.GetEnvironmentVariable("DOTNET_EnableDiagnostics") ?? Environment.GetEnvironmentVariable("COMPlus_EnableDiagnostics"); return string.IsNullOrEmpty(enableDiagnostics) || !"0".Equals(enableDiagnostics, StringComparison.Ordinal); } }