Skip to content

Latest commit

 

History

History
105 lines (70 loc) · 2.1 KB

File metadata and controls

105 lines (70 loc) · 2.1 KB

.NET VS Code Docker Debugging Settings

Requirements

An opinionated approach to developing applications with VSCode and docker-compose. Designed for quick startup via

git clone https://github.com/paljinov/dotnet-vscode-docker-debugging-settings.git example
cd example
code .

Then simply select Run->Start Debugging or press F5

VS Code settings configuration

Docker development

Run watcher, run source code on file change

  1. Build and compose app container

    docker-compose -f docker-compose.yml -f docker-compose.watch.yml up -d --force-recreate --build
  2. Get a bash shell in the container running container:

    docker-compose exec app /bin/bash
  3. Run watcher:

    dotnet watch run

Debug configuration

  1. Build and compose app container

    docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d --force-recreate --build
  2. Get a bash shell in the container running container:

    docker-compose exec app /bin/bash
  3. Run assembly:

    dotnet run

Release configuration

  1. Build and compose app container

    docker-compose up -d --force-recreate --build
  2. Get a bash shell in the container running container:

    docker-compose exec app /bin/bash
  3. Run assembly:

    dotnet Example.dll

Check logs

docker-compose logs -ft app

Local development

Run watcher, runs source code on file change

dotnet watch run

Run source code

dotnet run