Setup Xdebug WITH DOCKER and debug in VSCode

preview_player
Показать описание
In this video we will setup Xdebug 3 for PHP application running in docker and debug it using VSCode.

Project Source Code:

Setup Docker on Windows:

Setup Xdebug 3 for VSCode without docker:

TimeCodes
--------------------
00:00 - Intro
00:44 - Setup the project
02:28 - Next Video
02:48 - Install VSCode extensions
03:52 - Enable Xdebug in docker container
05:27 - Test Xdebug installation
06:27 - Configure VSCode for debugging
09:41 - Outtro

If you really love my content and want to support the channel:
👉 My Patreon: (For monthly donation)
🍺 Buy me Beer: (For one time donation)

🖱️Follow me on social media:🖱️

Check my Github:
Рекомендации по теме
Комментарии
Автор

I couldn't configure PHP debug, but you solved my problem; thanks a million!

sediqamousavi
Автор

This is very timely since Im exploring XDebug

kenjohnsiosan
Автор

Thank you! Very well done video, worked perfectly.

luciantarba
Автор

Really nice explained! Simple to follow and install xdebug

Kale_Kira_Nala
Автор

I'm allmost crying by happy. Thank you

kufhpxz
Автор

Thank you! - it solved my problem with debugging unit test on Ubuntu through Docker

chistowick
Автор

Thanks a I almost wasted all my day tring to make this before until... find your video!🤩
You are souls-saver of the desperate developers 🤣
Get this like and +1 sub 😎👍

leonidasferreira
Автор

Hi, "/var/www" is that your wsl local copy path or your project in the docker container path. Thanks

coliwong
Автор

I followed the instructions, the only difference is that I am actually on Linux, but whenever I try to run xdebug I just get an error that says 9003 is already in use? Any advice?

AndrewErwin
Автор

thanks for the video. just a advice, if you're doing things, let us know the sources of where you found out about the things and the thought process.

potaetoupotautoe
Автор

Will this work for servers too when I make requests through the browser or through postman?

aaron___
Автор

For many people, &{workspaceFolder} does not work and they have to enter the complete path (like path/to/your/project). It is a known bug, the fix works only for some. This is true both for Windows and Linux.

lukinkoo
Автор

I am using php5.6 for a legacy code, needs xdebug but I see xdebug.start_with_request is not compatible with that php version. What can I use instead?

javierquiroga
Автор

Even after struggling a lot in setting up the debugger I failed. But after watcing this video it worked. Thanks man!. For me, it worked after modifying php.ini file. After modifying, my php.ini file looks like this:

[xdebug]
xdebug.mode = debug
xdebug.start_with_request=yes
xdebug.discover_client_host = 1

vineethpeddi
Автор

Damn!

I've spent hours trying to make xdebug work, but i couldn't. With these configs, xdebug started working:
xdebug.mode = debug
xdebug.start_with_request=yes
xdebug.discover_client_host = 1

matheusrubens