Install XDebug 3 on PHP and VSCode

preview_player
Показать описание
We will setup debugging using xdebug with PHP inside of visual studio code. Initially we will install xdebug using pecl. Then we will additionally setup VSCODE to be able to set breakpoints, next we will use the PHP debug extension to connect to xdebug and set breakpoints in our code. The setup is valid for Ubuntu both on bare-metal as well as under Windows 10 with WSL.
[xdebug]
then set the port of the vscode php debug extension to 9003.

💖Support on Patreon:
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

02:35 Allow setting breakpoints in any file - this saved my day thank you!!

ldk_
Автор

Thank you Nevyan! I didn't know about the "remote_" rename to "client_"

LeLuizFelippe
Автор

Thank you for sharing your knowledge
That's awesome, That works.

MauroRochat
Автор

This shared content is simple and direct, thanks for sharing!
After change xdebug from 2 to 3 version, in my all get request i got: "Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 (through :-(" how can i prevent this delay time?

rubemalmeida
Автор

Hello. I can debug via terminal after setting up a lot of configurations relative to xdebug in a php.ini fashion. Now I want to debug in the browser, but I can't. My "Listen to Xdebug" configuration is same as yours, but it does not work neither in console or borwser.

erickdeazevedolima
Автор

hi i configured xdebag according to documentation, phpinfo () shows everything, but when launching Launch for XDebag or LAunch current open script
the column with variables, control values ​​and the stack remains empty, do you know what could be the problem?

sometimemaster
Автор

'php' is not recognized as an internal or external command,

vladeb