Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace COMPlus with DOTNET prefix #7434

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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