Skip to content

Commit

Permalink
Replace COMPlus with DOTNET prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Oct 6, 2024
1 parent d5cb8c9 commit 7b08aba
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion documentation/learningPath/aks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Tools/dotnet-monitor/RuntimeInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 7b08aba

Please sign in to comment.