Это работало в прошлом. Я не могу понять, почему.
Если xdebug не может установить сеанс TCP с удаленным хостом, все работает как положено.
Я использую Angular 10 в качестве среды разработки и PhpStorm в качестве IDE.
Среда:
Код: Выделить всё
Debian bullseye (testing)
Apache2.4
PHP 7.4.11
mpm_prefork
xdebug.so 2.9.8
Текущая версия /etc/php/7.4/mods-available/xdebug.ini:
Код: Выделить всё
#set xdebug flags/values
zend_extension=xdebug.so
xdebug.remote_autostart=0
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_host=MyClientIP
xdebug.remote_port=9099
xdebug.idekey=PHPSTORM
#xdebug logger
xdebug.remote_log = /var/log/xdebug/xdebug.log
При использовании сценария между клиентом и сервером создается сеанс.
Вывод клиента:
Код: Выделить всё
dbgpClient.exe -p 9099 -f
Xdebug Simple DBGp client (0.4.1)
Copyright 2019-2020 by Derick Rethans
Waiting for debug server to connect on port 9099.
Connect from 10.130.189.1:39144
DBGp/1.0: Xdebug 2.9.8 — For PHP 7.4.11
Debugging file:///home/init/DEV/MT4/php-services/ClassAPI.php (ID: 70831/PHPSTORM)
1 | feature_get
1 | supports_async: supported > 0
Код: Выделить всё
[70831] Log opened at 2020-10-14 20:59:24
[70831] I: Connecting to configured address/port: myClientIP:9099.
[70830] Log opened at 2020-10-14 20:59:24
[70830] I: Connecting to configured address/port: MyClientIP:9099.
[70831] I: Connected to client. :-)
[70831] ->
[70830] I: Connected to client. :-)
[70830] ->
Если я введу команду запуска и дополнительный возврат каретки или во-вторых, сеанс отладки продолжается и экран закрывается.
Пример клиента:
Код: Выделить всё
(cmd) run
2 | run > stopping/ok
(cmd)
Error while handling connection: Error reading length: EOF
Disconnect
Connect from 10.130.189.1:39146
DBGp/1.0: Xdebug 2.9.8 — For PHP 7.4.11
Debugging file:///home/init/DEV/MT4/php-services/ClassAPI.php (ID: 70830/PHPSTORM)
1 | feature_get
1 | supports_async: supported > 0
(cmd) run
2 | run > stopping/ok
(cmd)
Error while handling connection: Error reading length: EOF
Disconnect
Код: Выделить всё
[70831] ->
[70831]
[70831]
[70830]
[70830]
[70829] Log closed at 2020-10-14 21:13:17
[70832] ->
[70832] Log closed at 2020-10-14 21:13:38
Подробнее здесь: https://stackoverflow.com/questions/643 ... on-to-halt