0

I'm running the 2021 version of Rider and have a fairly simple docker-compose:

    version: "3"
    networks:
            internal:
                    external: false
    volumes: 
            test-data:
    services:
            aml:
                    hostname: aml
                    build: 
                            dockerfile: ./Docker/IntegrationTests/Dockerfile
                            context: ../
                            args:
                                    - GITHUB_USER=${GITHUB_USER}
                                    - GITHUB_TOKEN=${GITHUB_TOKEN}
                    environment:
                            - TZ=Europe/London
                    networks:
                            - internal
                    depends_on: 
                            - tn-mock
                            - db
                    volumes:
                            - test-data:/test-results
            tn-mock:
                    hostname: tn_mock
                    build:        
                            dockerfile: ./Docker/Mockoon/Dockerfile
                            context: ../
                    environment:
                            - TZ=Europe/London
                    restart: unless-stopped
                    networks:
                            - internal
            db:
                    hostname: db
                    build:                        
                            dockerfile: ./Dockerfile
                            context: ./ToteDB
                    environment:
                            - TZ=Europe/London
                    restart: unless-stopped
                    networks:
                            - internal

The aml container is a dotnet 5, C# 9 project with the following Dockerfile (I've removed some confidential info):

    ARG NET_IMAGE=5.0    
    FROM mcr.microsoft.com/dotnet/sdk:${NET_IMAGE} AS build
    RUN apt-get update && apt-get install -y libc-dev
    COPY . .
    ARG GITHUB_USER
    ARG GITHUB_TOKEN
    ARG DB_STRING
    ARG TN_ENDPOINT
    ENV ConnectionStrings__DefaultConnection=$DB_STRING
    ENV ToteAmlClientSettings__BaseEndPoint=$TN_ENDPOINT
    RUN dotnet nuget add source oursource.json -n github -u ${GITHUB_USER} -p ${GITHUB_TOKEN} --store-password-in-clear-text
    WORKDIR /project.integrationtests
    RUN dotnet restore 
    EXPOSE 3000
    VOLUME ["/test-results"]
    ENTRYPOINT dotnet test --test-adapter-path:. --logger:"junit;LogFileName=xunit/results.xml" --results-directory:/test-results

So I want to attach to the AML container so I can debug it. This article indicates that it should be possible.

However, when I run my stack through the Rider debug button, I get an error 244.

In terms of environment, I'm running up to date MacOS and dotnet 5.0.2.

Any ideas?

ScottishTapWater
  • 3,656
  • 4
  • 38
  • 81

1 Answers1

0

So two things I can see (and I am guessing). First of all, I don't see you do a build anywhere (I know test will create a build, but you aren't controlling that build). Second, don't you need to have a build that has debug symbols, etc. in order to set a break point? (which is what error 244 means)

DevTheo
  • 911
  • 6
  • 13