Debugging in VSCode fails to remote attach if Pitivi running in Docker container
When running Pitivi from a Docker container, the VSCode debugger is unable to remote attach to the opened port, despite it being properly mapped to the host.
The issue is how the default debugypy.listen()
calls occurs, and how Docker maps ports to the host. Some discussion is here:
https://github.com/microsoft/debugpy/issues/418
A simple solution to the problem is to listen on all ports (0.0.0.0
). Then when the container runs with port 5678
mapped to the host, VSCode is able to attach the debugger as expected.