diff --git a/docs/core/dependency-loading/default-probing.md b/docs/core/dependency-loading/default-probing.md index 16617e163cee6..00cd01190ba19 100644 --- a/docs/core/dependency-loading/default-probing.md +++ b/docs/core/dependency-loading/default-probing.md @@ -44,11 +44,13 @@ Each property is available by calling the ` |Traces to a file path instead of the default `stderr`.| -|`COREHOST_TRACE_VERBOSITY` |Sets the verbosity from 1 (lowest) to 4 (highest).| +|Environment Variable |Description | +|-------------------------------|---------| +|`DOTNET_HOST_TRACE=1` |Enables tracing.| +|`DOTNET_HOST_TRACEFILE=` |Traces to a file path instead of the default `stderr`.| +|`DOTNET_HOST_TRACE_VERBOSITY` |Sets the verbosity from 1 (lowest) to 4 (highest).| + +For more information, see [DOTNET_HOST_TRACE environment variables](../tools/dotnet-environment-variables.md#dotnet_host_trace). ## Managed assembly default probing diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index 2cbceee157c00..db7356bfe0974 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -395,20 +395,33 @@ Specifies the minimum number of hours between background downloads of advertisin Specifies whether .NET SDK local tools search for tool manifest files in the root folder on Windows. The default is `false`. -### `COREHOST_TRACE` +### `DOTNET_HOST_TRACE` + +**This variable applies to .NET 10 and later versions.** For older versions, replace the `DOTNET_HOST_` prefix with [`COREHOST_`](#corehost_trace). Controls diagnostics tracing from the hosting components, such as `dotnet.exe`, `hostfxr`, and `hostpolicy`. -- `COREHOST_TRACE=[0/1]` - default is `0` - tracing disabled. If set to `1`, diagnostics tracing is enabled. -- `COREHOST_TRACEFILE=` - has an effect only if tracing is enabled by setting `COREHOST_TRACE=1`. When set, the tracing information is written to the specified file; otherwise, the trace information is written to `stderr`. -- `COREHOST_TRACE_VERBOSITY=[1/2/3/4]` - default is `4`. The setting is used only when tracing is enabled via `COREHOST_TRACE=1`. +- `DOTNET_HOST_TRACE=[0/1]` - default is `0` - tracing disabled. If set to `1`, diagnostics tracing is enabled. +- `DOTNET_HOST_TRACEFILE=` - has an effect only if tracing is enabled by setting `DOTNET_HOST_TRACE=1`. When set, the tracing information is written to the specified file; otherwise, the trace information is written to `stderr`. +- `DOTNET_HOST_TRACE_VERBOSITY=[1/2/3/4]` - default is `4`. The setting is used only when tracing is enabled via `DOTNET_HOST_TRACE=1`. - `4` - all tracing information is written - `3` - only informational, warning, and error messages are written - `2` - only warning and error messages are written - `1` - only error messages are written -The typical way to get detailed trace information about application startup is to set `COREHOST_TRACE=1` and`COREHOST_TRACEFILE=host_trace.txt` and then run the application. A new file `host_trace.txt` will be created in the current directory with the detailed information. +The typical way to get detailed trace information about application startup is to set `DOTNET_HOST_TRACE=1` and `DOTNET_HOST_TRACEFILE=host_trace.txt` and then run the application. A new file `host_trace.txt` will be created in the current directory with the detailed information. + +### `COREHOST_TRACE` + +Controls diagnostics tracing from the hosting components, such as `dotnet.exe`, `hostfxr`, and `hostpolicy`. + +> [!NOTE] +> Starting with .NET 10, use the [`DOTNET_HOST_TRACE`](#dotnet_host_trace) environment variables instead. The `COREHOST_TRACE` variables work the same as `DOTNET_HOST_TRACE` variables. + +- `COREHOST_TRACE` - see [`DOTNET_HOST_TRACE`](#dotnet_host_trace). +- `COREHOST_TRACEFILE` - see [`DOTNET_HOST_TRACEFILE`](#dotnet_host_trace). +- `COREHOST_TRACE_VERBOSITY` - see [`DOTNET_HOST_TRACE_VERBOSITY`](#dotnet_host_trace). ### `SuppressNETCoreSdkPreviewMessage`