Docker with Xdebug & VSCode on Ubuntu

Docker with Xdebug & VSCode on Ubuntu



We will see how to enable the debugging of containerized PHP applications inside of VSCode with the help of Xdebug. We will install and configure the extension.
Note for Xdebug v3 check this document:

Docker for web developers course:

Article on the subject:

Updates on xdebug v.3:

—————————————————————————————————————-
👥 SUBSCRIBE! ► ◄
—————————————————————————————————————-

7 thoughts on “Docker with Xdebug & VSCode on Ubuntu

  1. Thank you so much!

    My problem was the remote_connect_back, which was setted to 1.
    I dont know why with this config was ruining my connection between the IDE and the Xdebug, but thank you for pointing that out.
    This was making me crazy already.

    If anyone with a similar problem gets here.
    My setup is: Windows + Docker + WSL2
    And my config:

    xdebug.remote_enable=1
    xdebug.remote_autostart=1
    xdebug.remote_connect_back=0
    xdebug.remote_handler=dbgp
    xdebug.remote_port=9000
    xdebug.remote_host=host.docker.internal

  2. Thanks Your tutorial,
    I think you should use 'xdebug.remote_host=host.docker.internal' better than hard code IP address.

Leave a Reply

Your email address will not be published. Required fields are marked *