Neovim for Beginners — Python Remote Debugging

Configure remote debugging for a dockerized Python application.

4 min readJun 29, 2022


Neovim for Beginners — Python Remote Debugging

In this article, we will learn how to debug a Python application running inside a Docker container.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Getting Started

In previous articles, we learned how to debug applications using either nvim-dap or vimspector. Those applications are running in a local development setup.

For applications running inside Docker, we can still debug them. For demonstration purposes, we will use the YOLO web-based object detection system. The application is developed using React and Python FastAPI framework.

The application captures an image using the webcam and detects the objects.

Do also check out this article in which we use VS Code to debug Python applications. This should give you a basic understanding of debugging Python applications using debugpy.

Application Configuration

For the dockerized application to be debuggable, we need to make changes to the application settings.


In the docker-compose.yml file, we need to export a port for debugging and modify the security settings.

build: backend
restart: always
- 8088:8088
- 5678:5678




Software engineer, Data Science and ML practitioner.