Skip to content

Commit

Permalink
Replace COMPlus with DOTNET prefix (#7478)
Browse files Browse the repository at this point in the history
  • Loading branch information
jander-msft authored Oct 15, 2024
1 parent 28677e0 commit 0fcb224
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
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 @@ -88,8 +88,7 @@ static Exception getNotAvailableException(string reason)
throw getNotAvailableException(Strings.ParameterCapturingNotAvailable_Reason_HostingStartupDidNotLoad);
}

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 0fcb224

Please sign in to comment.