Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 28, 2025

This PR adds comprehensive documentation for the new DOTNET_HOST_TRACE environment variables introduced in .NET 10, which replace the existing COREHOST_TRACE variables.

cc @dotnet/appmodel @AaronRobinsonMSFT

Changes Made

New DOTNET_HOST_TRACE Documentation

Added a new section documenting the three DOTNET_HOST_TRACE environment variables:

  • DOTNET_HOST_TRACE=[0/1] - Controls diagnostics tracing enablement
  • DOTNET_HOST_TRACEFILE=<file path> - Specifies trace output file location
  • DOTNET_HOST_TRACE_VERBOSITY=[1/2/3/4] - Sets trace verbosity level

The documentation includes:

  • Clear indication that these variables apply to .NET 10 and later versions with backward compatibility guidance
  • Complete usage examples and default values
  • Detailed explanation of verbosity levels (1=errors only, 4=all information)

Updated COREHOST_TRACE Documentation

Modified the existing COREHOST_TRACE section to include a note directing users to prefer the new DOTNET_HOST_TRACE variables for .NET 10+, while maintaining backward compatibility documentation. Simplified the variable descriptions to reference the equivalent DOTNET_HOST_* variables instead of duplicating detailed information.

Enhanced Dependency Loading Documentation

Updated the environment variables table in the default probing documentation to focus on the new DOTNET_HOST_TRACE variables with a reference link to detailed documentation, removing duplication and version annotations from individual table cells.

Impact

  • Developers using .NET 10+ will now have clear guidance on using the preferred DOTNET_HOST_TRACE variables
  • Existing COREHOST_TRACE documentation remains intact for backward compatibility with reduced duplication
  • Cross-references between old and new variables help with migration

The DOTNET_HOST_TRACE variables work identically to their COREHOST_TRACE counterparts, providing the same diagnostics tracing functionality with updated naming that aligns with the DOTNET_ prefix convention.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/core/dependency-loading/default-probing.md Default probing
docs/core/tools/dotnet-environment-variables.md .NET environment variables

Copilot AI changed the title [WIP] Add docs for DOTNET_HOST_TRACE environment variables. It should indicate that it was added in .NET 10. The variables mean the same thing as the COREHOST_TRACE environment variables (COREHOST_ prefix is replaced with DOTNET_HOST_). The doc for `... Add documentation for DOTNET_HOST_TRACE environment variables (.NET 10+) Jul 28, 2025
Copilot AI requested a review from elinor-fung July 28, 2025 19:24
Copilot finished work on behalf of elinor-fung July 28, 2025 19:24
…COREHOST_TRACE duplication

Co-authored-by: elinor-fung <[email protected]>
Copilot AI requested a review from elinor-fung July 28, 2025 20:09
Copilot finished work on behalf of elinor-fung July 28, 2025 20:09
Copilot AI requested a review from elinor-fung July 28, 2025 20:22
Copilot finished work on behalf of elinor-fung July 28, 2025 20:22
@elinor-fung elinor-fung marked this pull request as ready for review July 28, 2025 21:03
@elinor-fung elinor-fung requested review from a team and tdykstra as code owners July 28, 2025 21:03
Co-authored-by: Genevieve Warren <[email protected]>
@gewarren gewarren merged commit 8a46fac into main Jul 29, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-0e60b296-2a46-4758-8c94-b690a9223bb9 branch July 29, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants