-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote process picker does not work (attach to Docker container scenario) #4607
Comments
CC @WardenGnaw |
Running:
Not seeing this repro on macOS M1 BigSur 11.2.1 or Windows x64. I was able to see the |
@WardenGnaw correct, when |
The idea of #4509 was to have multiple outputs since VS Code commands are only able to have a single output. We needed processId and arch to support debugging on Apple M1. The idea now is that Is the configuration above not passed the the C# Omnisharp debugger? |
(please take the following with a grain of salt--I am not super familiar with how VS Code debugging works) I think the problem is that, in the scenario described by the repro steps, is the Docker extension that "resolves" the debug configuration, not the Omnisharp extension. Since the logic to fill the |
I took a quick look at the flow in vscode-docker. This might be that VS Code is happy with the resolution but the debug @isidorn @weinand Can you confirm this flow for VS Code? We can bring back the |
For the Docker extension use case the extension can inspect the image and add the
Yes, that is my understanding as well (and it is in line with the observed behavior). |
The one possible VS Code issue here is that vscode-docker returns the configuration in resolveDebugConfiguration and since it returned the type If that is not how VS Code team expects it to work. we can bring back the command as |
So @WardenGnaw what would be the plan here? Do you want to pursue the route of making VS Code re-resolve the debug configuration if This bug is kind of important for Docker extension to resolve, because all of our Docker Compose debugging functionality is based on attaching the debugger to running container... |
Ideally they should fix the issue that It looks like this issue has been here for a while: microsoft/vscode#110889 |
Ideally, yes, but microsoft/vscode#110889 is a new functionality, which may take a while for VS Code core to discuss and implement. For our customers that are suffering from this regression today, can we get back access to the process picker please? |
Created a PR for the temporary workaround. |
So @WardenGnaw just to make sure I understand the implications: when new OmniSharp release ships, the following configuration should work (changing {
"name": "Docker .NET Core Attach",
"type": "docker",
"request": "attach",
"platform": "netCore",
"processId": "${command:pickRemoteDockerProcess}"
} |
Yep. That is exactly the Here is the vsix of the omnisharp-vscode extension with the |
@WardenGnaw sorry for the slow response, I was on vacation. |
@isidorn I think the underlying issue is microsoft/vscode#110889 @WardenGnaw can you confirm this and would a fix for microsoft/vscode#110889 address this issue #4607? If yes, then I suggest that VS Code will try to address microsoft/vscode#110889. |
@isidorn Sorry the thread grew longer then when I pinged you. The core issue is that the The problem is that VS Code only calls docker's @weinand Yep. microsoft/vscode#110889 would fix this issue. |
@WardenGnaw Thanks for clarification. Then let's continue the discussion in microsoft/vscode#110889 |
The original scenario was addressed with the change that @WardenGnaw made, so closing this issue (the more general issue microsoft/vscode#110889 remains) |
Environment data
MacOS BigSur 11.4
.NET SDK 5.0.301
VS Code 1.57.0
C# extension 1.23.12
Docker extension 1.13.0
Docker Desktop for Mac version 3.3.3
OmniSharp log
Steps to reproduce
dotnet new webapi --no-https
Docker: add Docker files to workspace
command. Select ".NET ASP.NET Core", Linux, port 5000, yes to optional Docker Compose filesFROM mcr.microsoft.com/dotnet/aspnet:5.0-focal AS base
(note the image tag is5.0-focal
, not just5.0
Expected behavior
After the debugger is copied to the application container, the user should be prompted to select the process to attach to.
Actual behavior
An error message that says "No process with the specified id is currently running"
Additional information
When Docker extension resolves the debug configuration, it will return the following:
(
application_container_name
is the name of the running application container)This used to work until recently--the user would be prompted to select the process to attach to. I suspect #4509 might have broken this scenario.
FWIIW, the following launch configuration works as expected (assuming debugger bits have been already copied into the container):
(leveraging the new functionality that prompts the user to select a process when
processId
is left empty)The text was updated successfully, but these errors were encountered: