polyanin
@polyanin
Golang, PHP & Symfony developer

Как настроить многопользовательскую отладку через dbgp proxy?

Приветствую!
Кому удавалось настроить удаленную отладку несколькими пользователями с dbgp proxy, прошу помочь.
Имеется сервер разработки, ubuntu 20.04 с доступом по ssh
на сервере запущен dbgpProxy

./dbgpProxy 
Xdebug DBGp proxy (0.4.2-dev)
Copyright 2020 by Derick Rethans
2023-02-13 07:16:48.394 [warn] [SSL] The 'certs/fullchain.pem' file could not be found, not enabling SSL listeners
2023-02-13 07:16:48.394 [info] [dbgpProxy] Proxy started
2023-02-13 07:16:48.395 [info] [server] Started server server on 127.0.0.1:9003
2023-02-13 07:16:48.395 [info] [server] Started client server on 127.0.0.1:9001


настройки xdebug

zend_extension=xdebug.so
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9003
xdebug.log=/tmp/xdebug.log


на машине разработчика проброшены порты так:
./ssh config
RemoteForward 9003 localhost:9003
LocalForward 9001 localhost:9001


в phpstorm делаю Tools->Dbgp proxy->register IDE
в консоли вижу следующее:
2023-02-13 07:17:08.768 [info] [server] Start new client connection from 127.0.0.1:33682
2023-02-13 07:17:08.839 [info] [proxyinit] [POLYANIN] Added connection for IDE Key 'POLYANIN': 127.0.0.1:9001
2023-02-13 07:17:08.840 [info] [server] Closing client connection from 127.0.0.1:33682


т.е. IDE key успешно добавлен,
далее обновляю страницу сайта, который собираюсь дебажить, поставив предварительно в нужном месте кода breakpoint
и вижу в консоли следующее
2023-02-13 07:28:18.141 [info] [proxy-client] [POLYANIN] Found connection for IDE Key 'POLYANIN': 127.0.0.1:9001
2023-02-13 07:28:18.141 [info] [proxy-client] [POLYANIN] Connecting to 127.0.0.1:9001
2023-02-13 07:28:18.142 [info] [proxy-client] [POLYANIN] IDE connected
2023-02-13 07:28:18.142 [info] [server] Start new client connection from 127.0.0.1:33694
2023-02-13 07:28:18.142 [info] [proxy-client] [POLYANIN] Init forwarded, start pipe
2023-02-13 07:28:18.142 [warn] [server] Handler response error: Error reading command: Don't understand command '[507]'
2023-02-13 07:28:18.142 [info] [server] Closing client connection from 127.0.0.1:33694
2023-02-13 07:28:18.192 [info] [proxy-client] [POLYANIN] IDE closed connection


и далее ничего не происходит.
Лог xdebug

[28175] Log opened at 2023-02-13 07:14:52.095478
[28175] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[28175] [Config] INFO: No shared secret: Activating
[28175] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:9003.
[28175] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (through xdebug.client_host/xdebug.client_port). :-)
[28175] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///project/username/project/www/api/index.php" language="PHP" xdebug:language_version="8.1.12" protocol_version="1.0" appid="28175" idekey="username"><engine version="3.1.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[h
ttps://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2022 by Derick Rethans]]></copyright></init>

[27790] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[27790] [Step Debug] WARN: 2023-02-13 07:14:52.110299: There was a problem sending 179 bytes on socket 7: Broken pipe.
[27790] Log closed at 2023-02-13 07:14:52.110983

[28175] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[28175] [Step Debug] WARN: 2023-02-13 07:14:52.507136: There was a problem sending 179 bytes on socket 7: Broken pipe.
[28175] Log closed at 2023-02-13 07:14:52.507968

[28512] Log opened at 2023-02-13 07:14:57.545969
[28512] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[28512] [Config] INFO: No shared secret: Activating
[28512] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:9003.
[28512] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (through xdebug.client_host/xdebug.client_port). :-)
[28512] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///project/username/project/www/api/index.php" language="PHP" xdebug:language_version="8.1.12" protocol_version="1.0" appid="28512" idekey="username"><engine version="3.1.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[h
ttps://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2022 by Derick Rethans]]></copyright></init>

[28512] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[28512] [Step Debug] WARN: 2023-02-13 07:14:57.897175: There was a problem sending 179 bytes on socket 7: Broken pipe.
[28512] Log closed at 2023-02-13 07:14:57.898453

[27790] Log opened at 2023-02-13 07:28:18.133977
[27790] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[27790] [Config] INFO: No shared secret: Activating
[27790] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:9003.
[27790] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (through xdebug.client_host/xdebug.client_port). :-)
[27790] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///project/username/project/www/index.php" language="PHP" xdebug:language_version="8.1.12" protocol_version="1.0" appid="27790" idekey="username"><engine version="3.1.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https
://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2022 by Derick Rethans]]></copyright></init>

[27790] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[27790] Log closed at 2023-02-13 07:32:35.723440
  • Вопрос задан
  • 207 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы
19 апр. 2024, в 17:06
15000 руб./за проект
19 апр. 2024, в 16:53
1000 руб./за проект
19 апр. 2024, в 16:45
5000 руб./за проект