Skip to content

Commit 1b7a403

Browse files
committed
Updates for Attach to Process for Docker and WSL scenarios
1 parent 66f7a47 commit 1b7a403

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/debugger/attach-to-process-running-in-docker-container.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Attach to a process running on a Docker container
33
description: Explore how to debug an application running a Windows Docker container or a Linux .NET Core Docker container by using Visual Studio.
4-
ms.date: "05/01/2024"
4+
ms.date: "11/19/2024"
55
ms.topic: "conceptual"
66
helpviewer_keywords:
77
- "debugging, linux Docker container"
@@ -34,6 +34,9 @@ You can attach the Visual Studio debugger to a process running in a Linux .NET C
3434
> [!IMPORTANT]
3535
> To use this feature, you must have local access to the source code.
3636
37+
> [!NOTE]
38+
> You can use these instructions to attach to Linux Docker running in WSL over SSH, but your WSL instance must first run an SSH server. For example, you could install Open SSH Server (for example: `sudo apt-get install openssh-server`), configure the server by editing the configuration file (for example: /etc/ssh/sshd_config), and then start the server (for example: `sudo service ssh start`).
39+
3740
To attach to a running process in a Linux Docker container:
3841

3942
1. In Visual Studio, select **Debug > Attach to Process (CTRL+ALT+P)** to open the **Attach to Process** dialog box.

docs/debugger/debug-dotnet-core-in-wsl-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can easily run and debug your .NET Core and .NET 5+ apps in Linux without le
1919

2020
For a Windows .NET user targeting Linux, WSL lives in a sweet spot between production realism and productivity. In Visual Studio, you can already debug in a remote Linux environment using the [remote debugger](../debugger/remote-debugging-dotnet-core-linux-with-ssh.md), or with containers using the [Container Tools](../containers/overview.md). When production realism is your main concern, you should use one of those options. When an easy and fast inner-loop is more important, WSL is a great option.
2121

22-
You don't have to choose just one method! You can have a launch profile for Docker and WSL in the same project and pick whichever is appropriate for a particular run. And once your app is deployed, you can always use the remote debugger to attach to it if there's an issue.
22+
You don't have to choose just one method! You can have a launch profile for Docker and WSL in the same project and pick whichever is appropriate for a particular run. And once your app is deployed, you can always use the remote debugger to attach to it if there's an issue. To debug a Linux Docker container running in WSL, see [Attach to a process running on a Docker container](../debugger/attach-to-process-running-in-docker-container.md).
2323

2424
> [!NOTE]
2525
> Starting in Visual Studio 2019 version 16.11 Preview 3, the WSL 2 debug target was renamed to WSL.

0 commit comments

Comments
 (0)