Skip to content

Commit

Permalink
Add .NET Debugger Extensions documentation (dotnet#43825)
Browse files Browse the repository at this point in the history
* 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 <tommcdon@microsoft.com>

* Review feedback - add new files to toc.yml

* Apply suggestions from code review

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>

---------

Co-authored-by: Tom McDonald <tommcdon@microsoft.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 3, 2024
1 parent 6bdcecb commit 4cc4efe
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 25 deletions.
242 changes: 242 additions & 0 deletions docs/core/diagnostics/debugger-extensions.md

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions docs/core/diagnostics/dotnet-debugger-extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: dotnet-debugger-extensions diagnostic tool - .NET CLI
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.
ms.date: 11/17/2020
ms.topic: reference
ms.custom: linux-related-content
---
# .NET debugger extensions installer (dotnet-debugger-extensions)

**This article applies to:** ✔️ .NET 6.0 SDK and later versions

## Install

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:

```dotnetcli
dotnet tool install --global dotnet-debugger-extensions
```

## Synopsis

```console
dotnet-debugger-extensions [-h|--help] [options] [command]]
```

## Description

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.

> [!NOTE]
> The Windows Debugger (>= version 10.0.18317.1001 of WinDbg or cdb) automatically loads the extensions from the Microsoft extension gallery.
## Options

- **`--version`**

Displays version information.

- **`-h|--help`**

Shows command-line help.

## dotnet-debugger-extensions install

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.

This overwrites any previous installations from the dotnet-debugger-extensions or dotnet-sos installers.

### Synopsis

```console
dotnet-debugger-extensions install [--architecture <arch>]
```

### Options

- **`--architecture <arch>`**

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`.

The following architectures are available:

- `Arm`
- `Arm64`
- `X86`
- `X64`

- **`--accept-license-agreement`**

This option accepts and agrees to the licensing agreement without manual keyboard interaction. For use when console input is redirected.

## dotnet-debugger-extensions uninstall

Uninstalls the [.NET debugger extensions](debugger-extensions.md) and, on Linux and macOS, removes it from LLDB configuration.

### Synopsis

```console
dotnet-debugger-extensions uninstall
```
18 changes: 10 additions & 8 deletions docs/core/diagnostics/dotnet-sos.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ ms.custom: linux-related-content
---
# SOS installer (dotnet-sos)

**This article applies to:** ✔️ .NET Core 2.1 SDK and later versions
**This article applies to:** ✔️ .NET 6.0 SDK and later versions

> [!NOTE]
Consider using the [.NET debugger extensions](dotnet-debugger-extensions.md) instead, which include the SOS functionality and additional features.

## Install

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

## Description

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.

> [!NOTE]
> 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.
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.

## Options

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

## dotnet-sos install

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.
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.

This overwrites any previous installations from the dotnet-debugger-extensions or dotnet-sos installers.

### Synopsis

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

- **`--architecture <arch>`**

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`.
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`.

The following architectures are available:

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

## dotnet-sos uninstall

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

### Synopsis

Expand Down
Loading

0 comments on commit 4cc4efe

Please sign in to comment.