Переходим Run → Edit configurations → Add → Python Remote Debug
Указываем номер порта, например 11122
.
Выключаем галку Suspend after connect
.
В Path mappings
нажимаем справа кнопку …
и указываем Local path
- путь до папки с проектом на локальной машине, Remote path
- путь до папки с проектом в контейнере, например: /opt/local/path/to/project=/opt/remote/path/to/project
.