Sublime & Xdebug - страница зависает при обновлении, но не выводится в Sublime windows - PullRequest
0 голосов
/ 15 мая 2019

Я пытался настроить Xdebug на Sublime Text для своих проектов, следуя в основном шагам по этой ссылке

https://www.sitepoint.com/debugging-xdebug-sublime-text-3/

Мои проекты выполняются в Docker, так что это мойsetup

Dockerfile

FROM php:7.3-apache-stretch
RUN pecl install xdebug \
    && docker-php-ext-enable xdebug \
    && a2enmod rewrite
COPY docker/config/php/conf.d/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

Файл xdebug.ini

[xdebug]
xdebug.default_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=0
xdebug.remote_host=my local ip address here
xdebug.remote_port=9001
xdebug.remote_enable=1
xdebug.remote_log=/tmp/xdebug.log
xdebug.idekey=sublime.xdebug

Возвышенный проект

{
    "folders": [{
        "name": "Name of the app",
        "path": ".",
        "follow_symlinks": true,
    }],
    "settings": {
        "xdebug": {
            "path_mapping": {
                "/absolute/path/to/server": "/absolute/path/local"
            },
            "url": "http://localhost",
            "port": 9001,
            "ide_key": "sublime.xdebug",
            "close_on_stop" : true
        }
    }
}

Я также установил врасширение браузера (как Firefox, так и Chrome) sublime.xdebug, но когда я начинаю отладку и обновляю страницу, я вижу, что страница «зависает» при загрузке, но я не получаю вывод в консольных окнах Sublime.Есть идеи, что я делаю не так?

Это xdebug.log, который я получаю, когда обновляю страницу

[18] Log opened at 2019-05-16 17:54:12
[18] I: Connecting to configured address/port: my-ip-address:9001.
[18] I: Connected to client. :-)
[18] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/public/index.php" language="PHP" xdebug:language_version="7.3.4" protocol_version="1.0" appid="18" idekey="docker"><engine version="2.7.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2019 by Derick Rethans]]></copyright></init>
[18]
[18] <- feature_set -i 1 -n show_hidden -v 1
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
[18]
[18] <- feature_set -i 2 -n max_children -v 32
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>
[18]
[18] <- feature_set -i 3 -n max_data -v 1024
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_data" success="1"></response>
[18]
[18] <- feature_set -i 4 -n max_depth -v 1
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="max_depth" success="1"></response>
[18]
[18] <- breakpoint_set -i 5 -t line -f file%3A///var/www/html/public/index.php -n 21
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="180001"></response>
[18]
[18] <- breakpoint_set -i 6 -t exception -x "Fatal error"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="180002"></response>
[18]
[18] <- breakpoint_set -i 7 -t exception -x "Catchable fatal error"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="180003"></response>
[18]
[18] <- breakpoint_set -i 8 -t exception -x "Warning"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="180004"></response>
[18]
[18] <- breakpoint_set -i 9 -t exception -x "Parse error"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="180005"></response>
[18]
[18] <- breakpoint_set -i 10 -t exception -x "Notice"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="180006"></response>
[18]
[18] <- breakpoint_set -i 11 -t exception -x "Strict standards"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="11" id="180007"></response>
[18]
[18] <- breakpoint_set -i 12 -t exception -x "Deprecated"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="180008"></response>
[18]
[18] <- breakpoint_set -i 13 -t exception -x "Xdebug"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="13" id="180009"></response>
[18]
[18] <- breakpoint_set -i 14 -t exception -x "Unknown error"
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="14" id="180010"></response>
[18]
[18] <- run -i 15
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="15" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/public/index.php" lineno="21"></xdebug:message></response>
[18]
[18] <- context_get -i 16 -c 1
[18] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="16" context="1">

Последняя строка (т. Е. <response xmlns=urn:debugger_protocol_v1") - это массивнаяXML-файл, который, насколько я вижу, содержит все мои переменные ENV и заканчивается этим

[18] Log closed at 2019-05-16 17:54:28
[18]
[20] Log opened at 2019-05-16 18:00:07
[20] I: Connecting to configured address/port: my-ip-address:9001.
[20] W: Creating socket for 'my-ip-address:9001', poll success, but error: Operation now in progress (29).
[20] E: Could not connect to client. :-(
[20] Log closed at 2019-05-16 18:00:07
...