-
Notifications
You must be signed in to change notification settings - Fork 552
Closed
Labels
Milestone
Description
Repro steps
dotnet new api --name mygreatapi- Open in VS Code, do "Docker: Add Docker files". When asked about Compose files, say yes.
- Set a breakpoint somewhere in the code.
- Follow the instructions to set up and start an attach-type debug session.
- Hit the API endpoint (e.g. using
curl)
Expected
The breakpoint should be hit
Actual
The program starts, the debugger attaches successfully, but the breakpoint is NOT hit.
Additional information
This happens because the scaffolded Dockerfile uses hard-coded Release build configuration, and the scaffolded docker-compose-debug.yml file uses the Dockerfile without any customization.
To fix this issue we should probably define the application (.NET) build configuration as a build parameter for the Dockerfile, with default value set to Release. Then in the docker-compose-debug.yml file we can override the build configuration so that Debug is used when the app is launched via this Compose file.
Reactions are currently unavailable