Skip to content

Commit 4cc4efe

Browse files
Mike McLaughlintommcdongewarren
authored
Add .NET Debugger Extensions documentation (#43825)
* Add .NET Debugger Extensions documentation Add Native AOT supported commands Improve doc score. lldb -> LLDB. * Fix lint run * Update docs/core/diagnostics/tools-overview.md Co-authored-by: Tom McDonald <[email protected]> * Review feedback - add new files to toc.yml * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Tom McDonald <[email protected]> Co-authored-by: Genevieve Warren <[email protected]>
1 parent 6bdcecb commit 4cc4efe

File tree

6 files changed

+351
-25
lines changed

6 files changed

+351
-25
lines changed

docs/core/diagnostics/debugger-extensions.md

Lines changed: 242 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: dotnet-debugger-extensions diagnostic tool - .NET CLI
3+
description: Learn how to install and use the dotnet-debugger-extensions CLI tool to manage the .NET debugging extensions, which is used with native debuggers on Windows and Linux.
4+
ms.date: 11/17/2020
5+
ms.topic: reference
6+
ms.custom: linux-related-content
7+
---
8+
# .NET debugger extensions installer (dotnet-debugger-extensions)
9+
10+
**This article applies to:** ✔️ .NET 6.0 SDK and later versions
11+
12+
## Install
13+
14+
To install the latest release version of the `dotnet-debugger-extensions` [NuGet package](https://www.nuget.org/packages/dotnet-debugger-extensions), use the [dotnet tool install](../tools/dotnet-tool-install.md) command:
15+
16+
```dotnetcli
17+
dotnet tool install --global dotnet-debugger-extensions
18+
```
19+
20+
## Synopsis
21+
22+
```console
23+
dotnet-debugger-extensions [-h|--help] [options] [command]]
24+
```
25+
26+
## Description
27+
28+
The `dotnet-debugger-extensions` global tool installs the [.NET debugger extensions](debugger-extensions.md), which enable better debugging experience in native debuggers like WinDbg and LLDB.
29+
30+
> [!NOTE]
31+
> The Windows Debugger (>= version 10.0.18317.1001 of WinDbg or cdb) automatically loads the extensions from the Microsoft extension gallery.
32+
33+
## Options
34+
35+
- **`--version`**
36+
37+
Displays version information.
38+
39+
- **`-h|--help`**
40+
41+
Shows command-line help.
42+
43+
## dotnet-debugger-extensions install
44+
45+
Installs the [.NET debugger extensions](debugger-extensions.md) locally for debugging .NET Core processes. On macOS and Linux, the *.lldbinit* file is updated so that the extension automatically loads at LLDB startup. If you're installing on Windows with older debugging tools (before version 10.0.18317.1001), you need to manually load the extension in WinDbg or cdb by running `.load %USERPROFILE%\.dotnet\sos\sos.dll` in the debugger.
46+
47+
This overwrites any previous installations from the dotnet-debugger-extensions or dotnet-sos installers.
48+
49+
### Synopsis
50+
51+
```console
52+
dotnet-debugger-extensions install [--architecture <arch>]
53+
```
54+
55+
### Options
56+
57+
- **`--architecture <arch>`**
58+
59+
Specifies the processor architecture of the extension binaries to install. By default, `dotnet-debugger-extensions` installs the architecture of the host machine. Use this option when you want to install for an architecture that's different from the dotnet host architecture. For example, if you're running Arm32 binaries from an Arm64 host, you need to install with `dotnet-debugger-extensions install --architecture Arm`.
60+
61+
The following architectures are available:
62+
63+
- `Arm`
64+
- `Arm64`
65+
- `X86`
66+
- `X64`
67+
68+
- **`--accept-license-agreement`**
69+
70+
This option accepts and agrees to the licensing agreement without manual keyboard interaction. For use when console input is redirected.
71+
72+
## dotnet-debugger-extensions uninstall
73+
74+
Uninstalls the [.NET debugger extensions](debugger-extensions.md) and, on Linux and macOS, removes it from LLDB configuration.
75+
76+
### Synopsis
77+
78+
```console
79+
dotnet-debugger-extensions uninstall
80+
```

docs/core/diagnostics/dotnet-sos.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ ms.custom: linux-related-content
77
---
88
# SOS installer (dotnet-sos)
99

10-
**This article applies to:** ✔️ .NET Core 2.1 SDK and later versions
10+
**This article applies to:** ✔️ .NET 6.0 SDK and later versions
11+
12+
> [!NOTE]
13+
Consider using the [.NET debugger extensions](dotnet-debugger-extensions.md) instead, which include the SOS functionality and additional features.
1114

1215
## Install
1316

@@ -38,10 +41,7 @@ dotnet-sos [-h|--help] [options] [command]]
3841

3942
## Description
4043

41-
The `dotnet-sos` global tool installs the [SOS debugger extension](sos-debugging-extension.md). This extension lets you inspect managed .NET Core state from native debuggers like lldb and windbg.
42-
43-
> [!NOTE]
44-
> Installing SOS via the `dotnet-sos` tool is only needed on Linux or macOS. It may also be needed on Windows if you're using older debugging tools. Recent versions of the [Windows Debugger](/windows-hardware/drivers/debugger/debugger-download-tools) (>= version 10.0.18317.1001 of WinDbg or cdb) load SOS automatically from the Microsoft extension gallery.
44+
The `dotnet-sos` global tool installs the [SOS debugger extension](sos-debugging-extension.md). This extension lets you inspect managed .NET Core state from native debuggers like LLDB and WinDbg.
4545

4646
## Options
4747

@@ -55,7 +55,9 @@ The `dotnet-sos` global tool installs the [SOS debugger extension](sos-debugging
5555

5656
## dotnet-sos install
5757

58-
Installs the [SOS extension](sos-debugging-extension.md) locally for debugging .NET Core processes. On macOS and Linux, the *.lldbinit* file will be updated so that the extension automatically loads at lldb startup. If you're installing SOS on Windows with older debugging tools (prior to version 10.0.18317.1001), you will need to manually load the extension in WinDbg or cdb by running `.load %USERPROFILE%\.dotnet\sos\sos.dll` in the debugger.
58+
Installs the [SOS extension](sos-debugging-extension.md) locally for debugging .NET Core processes. On macOS and Linux, the *.lldbinit* file is updated so that the extension automatically loads at LLDB startup. If you're installing SOS on Windows with older debugging tools (before version 10.0.18317.1001), you need to manually load the extension in WinDbg or cdb by running `.load %USERPROFILE%\.dotnet\sos\sos.dll` in the debugger.
59+
60+
This overwrites any previous installations from the dotnet-debugger-extensions or dotnet-sos installers.
5961

6062
### Synopsis
6163

@@ -67,7 +69,7 @@ dotnet-sos install [--architecture <arch>]
6769

6870
- **`--architecture <arch>`**
6971

70-
Specifies the processor architecture of the SOS binaries to install. By default, `dotnet-sos` installs the architecture of the host machine. Use this option when you want to install SOS for an architecture that's different from the dotnet host architecture. For example, if you're running Arm32 binaries from an Arm64 host, you will need to install SOS with `dotnet-sos install --architecture Arm`.
72+
Specifies the processor architecture of the SOS binaries to install. By default, `dotnet-sos` installs the architecture of the host machine. Use this option when you want to install SOS for an architecture that's different from the dotnet host architecture. For example, if you're running Arm32 binaries from an Arm64 host, you need to install SOS with `dotnet-sos install --architecture Arm`.
7173

7274
The following architectures are available:
7375

@@ -78,7 +80,7 @@ dotnet-sos install [--architecture <arch>]
7880

7981
## dotnet-sos uninstall
8082

81-
Uninstalls the [SOS extension](sos-debugging-extension.md) and, on Linux and macOS, removes it from lldb configuration.
83+
Uninstalls the [SOS extension](sos-debugging-extension.md) and, on Linux and macOS, removes it from LLDB configuration.
8284

8385
### Synopsis
8486

0 commit comments

Comments
 (0)