Loading... # PHP XDebug Usage ## How To Start > automatically or manually (recommend) * Query param: `XDEBUG_SESSION_START=sessName` * IDE session: `XDEBUG_SESSION=sessName` ### Setup Static Client IP (Docker/VM) ``` # xdebug 3.x [xdebug] xdebug.mode = develop,debug # replace the xdebug2 xdebug.remote_enable xdebug.client_host = host.docker.internal # IDE machine ip xdebug.client_port = 9003 # IDE debug extension TCP port xdebug.start_with_request = yes # replace the xdebug2 xdebug.remote_autostart xdebug.idekey = "PHPSTORM" xdebug.remote_log = /var/log/xdebug.log ``` ## DEBUG ``` # docker/vm connect to phpstorm bash > curl -v telnet://host.docker.internal:9003 # Encounter error `the input device is not a TTY` # Please add the environment variables value: `COMPOSE_INTERACTIVE_NO_CLI=1` ``` ![https://gz-blog-storage-1252787757.cos.ap-guangzhou.myqcloud.com/usr/uploads/2024/05/16621027583857.jpg](https://gz-blog-storage-1252787757.cos.ap-guangzhou.myqcloud.com/usr/uploads/2024/05/16621027583857.jpg) © Reprint prohibited Support Appreciate the author AliPayWeChat Like 1 If you think my article is useful to you, please feel free to appreciate