Docker container - no symbols have been loaded for this document

Viewed 1357

I already have my Visual Studio Code attached to my running container. It's a .Net Core WepApi. This is the link for the post I created when struggling to make it work.

The problem, I am facing now, is that despite the fact my VS Code is attached to the container I can't debug any code yet. It keeps saying:

No symbols has been loaded for this document

Which is kind of odd because I can see the pdb files where generated and deploy to the container:

enter image description here

When I attached the Docker Container my VS Code looks like this:

enter image description here

This is the updated docker file I have:

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out


###########START NEW IMAGE###########################################
# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1

#install debugger for NET Core
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
RUN apt update && \
    apt install -y unzip procps && \
    curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l /vsdbg

WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "BooksApi.dll"]

Has anyone have face a similar problem?

0 Answers
Related