Skip to content
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

Show Windows Container logs in the Container Tools "Logs" tab #442

Open
kamranayub opened this issue Sep 1, 2024 · 4 comments
Open

Show Windows Container logs in the Container Tools "Logs" tab #442

kamranayub opened this issue Sep 1, 2024 · 4 comments

Comments

@kamranayub
Copy link

kamranayub commented Sep 1, 2024

Related: #284, #25

As a Windows Container user, I expect to see logs within the Container Tools window for my containers.

According to the docs:

Visual Studio automatically redirects stdout and stderr to the Output window when you run without debugging with Windows containers, so Windows containers started from Visual Studio using Ctrl+F5 will not display logs in this tab; use the Output window instead.

This threw me for a loop, wondering where my logs were (expectation: Logs tab, duh) as I am using Windows Containers.

As mentioned in #25, when you have a lot of containers (like two web apps and a background jobs console app), the Output window gets real messy.

If anyone has some good workarounds to at least see the logs separately (using docker exec or something), I'm all ears 👂

@NCarlsonMSFT
Copy link
Member

@kamranayub which version of .NET are you using?

@NCarlsonMSFT NCarlsonMSFT added the Needs more info Apply this label for the bugs where a some new information is needed from the customer. label Sep 3, 2024
@kamranayub
Copy link
Author

kamranayub commented Sep 3, 2024

@kamranayub which version of .NET are you using?

.NET Framework 4.7.2, C# Console Project

Dockerfile created using Add Orchestrator Support:

#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat

FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2022
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["C:\\app\\Jobs.Host.exe"]

@dbreshears dbreshears removed the Needs more info Apply this label for the bugs where a some new information is needed from the customer. label Sep 3, 2024
@dbreshears
Copy link
Member

This is a known limitation of .Net Framework debugging with containers. The full Framework Remote debugger is not capable of writing to stdout and we use as the entry point when debugging. This would take a bit of rearchitecture in this area, but can keep this on the backlog see if there is enough interest to prioritize at some point in the future.

@kamranayub
Copy link
Author

This is a known limitation of .Net Framework debugging with containers. The full Framework Remote debugger is not capable of writing to stdout and we use as the entry point when debugging. This would take a bit of rearchitecture in this area, but can keep this on the backlog see if there is enough interest to prioritize at some point in the future.

Thanks, I figured it was, so I thought I'd open an issue to let others vote as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants