VSCode into Remote Docker Host Container XDebug

Written by James McDonald

September 30, 2021

I have another post that is VSCode on Windows 10 SSH into remote host and working in the project source directory then Xdebug

This post is different as it connecting to the Remote Docker Container and working inside the container.

VSCode running on Windows 10

Remote Docker host is running Ubuntu 20.04 and a number of containers running on docker

Windows 10 has Docker Desktop installed

launch.json contains

In VSCode Remote Explorer under Containers has a list of containers running on my remote Ubuntu box (see settings.json)

settings.json tells vscode about your remote Docker Host

Inside the container I have xdebug 3 compiled and the conf files with contents of both these the same



/etc/php/7.4/cli/conf.d/25-xdebug.ini inside container

xdebug.mode = debug
xdebug.remote_enable = 1
; xdebug.remote_connect_back = 1
; xdebug.remote_host =
; this 
; xdebug.client_host=
xdebug.idekey = "VSCODE"
xdebug.client_port = 9000
xdebug.remote_autostart = 1
xdebug.start_with_request = yes


Submit a Comment

Your email address will not be published.

You May Also Like…


Zebra Printer Language http://labelary.com/viewer.html The above website has a page where you can enter ZPL and it...

PHP Iterators

Just came across a Youtube talk "Iterators in PHP" by Jake Smith published in 2014 that steps through the many...

PHP array_map Multiple Arrays

array_map can take multiple arrays. I like how it starts mapping through them starting at the first element of each...