Skip to content

Commit f7e95b7

Browse files
authored
[docs] Add a note on Native AOT diagnostics support on iOS-like platforms (#43399)
1 parent 68b41bc commit f7e95b7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/core/deploying/native-aot/diagnostics.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ ms.date: 08/07/2023
88

99
# Diagnostics and instrumentation
1010

11-
Native AOT shares some, but not all, diagnostics and instrumentation capabilities with CoreCLR. Because of CoreCLR's rich selection of diagnostic utilities, it's sometimes appropriate to diagnose and debug problems in CoreCLR. Apps that are [trim-compatible](../trimming/prepare-libraries-for-trimming.md) shouldn't have behavioral differences, so investigations often apply to both runtimes. Nonetheless, some information can only be gathered after publishing, so Native AOT also provides post-publish diagnostic tooling.
11+
Native AOT shares some, but not all, diagnostics and instrumentation capabilities with the full .NET runtime. Apps that are [trim-compatible](../trimming/prepare-libraries-for-trimming.md) shouldn't have behavioral differences, so investigations often apply to both runtimes. As such, it's sometimes appropriate to diagnose and debug problems in the full .NET runtime, as it has a rich selection of available diagnostic utilities. Nonetheless, some information can only be gathered after publishing, so Native AOT also provides post-publish diagnostic tooling.
1212

13-
## .NET 8 Native AOT diagnostic support
13+
## Native AOT diagnostic support
1414

1515
The following table summarizes diagnostic features supported for Native AOT deployments:
1616

@@ -24,7 +24,7 @@ The following table summarizes diagnostic features supported for Native AOT depl
2424

2525
## Observability and telemetry
2626

27-
As of .NET 8, the Native AOT runtime supports [EventPipe](../../diagnostics/eventpipe.md), which is the base layer used by many logging and tracing libraries. You can interface with EventPipe directly through APIs like `EventSource.WriteEvent` or you can use libraries built on top, like [OpenTelemetry](../../diagnostics/observability-with-otel.md). EventPipe support also allows .NET diagnostic tools like [dotnet-trace](../../diagnostics/dotnet-trace.md), [dotnet-counters](../../diagnostics/dotnet-counters.md), and [dotnet-monitor](../../diagnostics/dotnet-monitor.md) to work seamlessly with Native AOT or CoreCLR applications. EventPipe is an optional component in Native AOT. To include EventPipe support, set the `EventSourceSupport` MSBuild property to `true`.
27+
As of .NET 8, the Native AOT runtime supports [EventPipe](../../diagnostics/eventpipe.md), which is the base layer used by many logging and tracing libraries. You can interface with EventPipe directly through APIs like `EventSource.WriteEvent` or you can use libraries built on top, like [OpenTelemetry](../../diagnostics/observability-with-otel.md). EventPipe support also allows .NET diagnostic tools like [dotnet-trace](../../diagnostics/dotnet-trace.md), [dotnet-counters](../../diagnostics/dotnet-counters.md), and [dotnet-monitor](../../diagnostics/dotnet-monitor.md) to work seamlessly with Native AOT or full .NET runtime applications. EventPipe is an optional component in Native AOT. To include EventPipe support, set the `EventSourceSupport` MSBuild property to `true`.
2828

2929
```xml
3030
<PropertyGroup>
@@ -37,7 +37,7 @@ Native AOT provides partial support for some [well-known event providers](../../
3737
## Development-time diagnostics
3838

3939
The .NET CLI tooling (`dotnet` SDK) and Visual Studio offer separate commands for `build` and
40-
`publish`. `build` (or `Start` in Visual Studio) uses CoreCLR. Only `publish` creates a
40+
`publish`. `build` (or `Start` in Visual Studio) uses the full .NET runtime. Only `publish` creates a
4141
Native AOT application. Publishing your app as Native AOT produces an app that has been
4242
ahead-of-time (AOT) compiled to native code. As mentioned previously, not all diagnostic
4343
tools work seamlessly with published Native AOT applications in .NET 8. However, all .NET
@@ -46,7 +46,7 @@ developing, debugging, and testing the applications as usual and publishing the
4646

4747
## Native debugging
4848

49-
When you run your app during development, like inside Visual Studio, or with `dotnet run`, `dotnet build`, or `dotnet test`, it runs on CoreCLR by default. However, if `PublishAot` is present in the project file, the behavior should be the same between CoreCLR and Native AOT. This characteristic allows you to use the standard Visual Studio managed debugging engine for development and testing.
49+
When you run your app during development, like inside Visual Studio, or with `dotnet run`, `dotnet build`, or `dotnet test`, it runs on the full .NET runtime by default. However, if `PublishAot` is present in the project file, the behavior should be the same between the full .NET runtime and Native AOT. This characteristic allows you to use the standard Visual Studio managed debugging engine for development and testing.
5050

5151
After publishing, Native AOT applications are true native binaries. The managed debugger won't work on them. However, the Native AOT compiler generates fully native executable files that native debuggers can debug on your platform of choice (for example, WinDbg or Visual Studio on Windows and gdb or lldb on Unix-like systems).
5252

@@ -78,3 +78,7 @@ Platform-specific tools like [PerfView](https://github.com/microsoft/perfview) a
7878
## Heap analysis
7979

8080
Managed heap analysis isn't currently supported in Native AOT. Heap analysis tools like [dotnet-gcdump](../../diagnostics/dotnet-gcdump.md), [PerfView](https://github.com/microsoft/perfview), and Visual Studio heap analysis tools don't work in Native AOT in .NET 8.
81+
82+
## See also
83+
84+
- [Native AOT diagnostic support on iOS and Mac Catalyst](/dotnet/maui/deployment/nativeaot#native-aot-diagnostic-support-on-ios-and-mac-catalyst)

0 commit comments

Comments
 (0)