Не работает Xdebug + PHP + VScode

Что делал:

  1. Установил xdebug используя https://xdebug.org/wizard

  2. В php.ini добавил следующий код: введите сюда описание изображения

  3. Установил в VScode расширение php debug.

  4. Cоздаю launch.json через VScode:

введите сюда описание изображения

Дальше пробую c помощью Ajax передать данные на search.php JS

$('#search').keyup(function(){
    let searchStr =  $('#search').val(); 
    $.ajax({
        url: '/search.php',
        type: 'POST',
        data: {'searchRequest': searchStr, 'test':'etst'},
        dataType: 'html',
        success: function(data){
            console.log(data);
        }
    })
})

PHP

<?

$a = 1;
echo 123;

?>

В search.php поставил брейкпоинты на все строки, запускаю xdebug

введите сюда описание изображения

По итогу брейкпоинты не срабатывают

введите сюда описание изображения

XDebug logs

[1964] Log opened at 2021-01-12 11:24:14
[1964] I: Connecting to configured address/port: 127.0.0.1:90.
[1964] I: Connected to client. :-)
[1964] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///W:/domains/smart-search.ru/search.php" language="PHP" xdebug:language_version="7.1.33" protocol_version="1.0" appid="1964" idekey="user"><engine version="2.9.8"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

[1964] <- breakpoint_list -i 1
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>

[1964] <- breakpoint_set -i 2 -t line -f file:///c:/Program%20Files/OpenServer/domains/smart-search.ru/search.php -n 3
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="19640008"></response>

[1964] <- breakpoint_set -i 3 -t line -f file:///c:/Program%20Files/OpenServer/domains/smart-search.ru/search.php -n 4
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="3" id="19640009"></response>

[1964] <- breakpoint_list -i 4
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="4" state="enabled" hit_count="0" hit_value="0" id="19640009"></breakpoint><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="3" state="enabled" hit_count="0" hit_value="0" id="19640008"></breakpoint></response>

[1964] <- breakpoint_list -i 5
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="5"><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="4" state="enabled" hit_count="0" hit_value="0" id="19640009"></breakpoint><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="3" state="enabled" hit_count="0" hit_value="0" id="19640008"></breakpoint></response>

[1964] <- breakpoint_set -i 6 -t exception -x Notice
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="19640010"></response>

[1964] <- breakpoint_set -i 7 -t exception -x Warning
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="19640011"></response>

[1964] <- breakpoint_set -i 8 -t exception -x Error
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="19640012"></response>

[1964] <- breakpoint_set -i 9 -t exception -x Exception
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="19640013"></response>

[1964] <- breakpoint_set -i 10 -t exception -x *
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="19640014"></response>

[1964] <- run -i 11
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="11" status="stopping" reason="ok"></response>

[1964] <- stop -i 12
[1964] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="12" status="stopped" reason="ok"></response>

[1964] Log closed at 2021-01-12 11:24:14

[11320] Log opened at 2021-01-12 11:24:51
[11320] I: Connecting to configured address/port: 127.0.0.1:9000.
[11320] I: Connected to client. :-)
[11320] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///W:/domains/smart-search.ru/search.php" language="PHP" xdebug:language_version="7.1.33" protocol_version="1.0" appid="11320" idekey="user"><engine version="2.9.8"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

[11320] <- breakpoint_list -i 1
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>

[11320] <- breakpoint_set -i 2 -t line -f file:///c:/Program%20Files/OpenServer/domains/smart-search.ru/search.php -n 3
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="113200001"></response>

[11320] <- breakpoint_set -i 3 -t line -f file:///c:/Program%20Files/OpenServer/domains/smart-search.ru/search.php -n 4
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="3" id="113200002"></response>

[11320] <- breakpoint_list -i 4
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="3" state="enabled" hit_count="0" hit_value="0" id="113200001"></breakpoint><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="4" state="enabled" hit_count="0" hit_value="0" id="113200002"></breakpoint></response>

[11320] <- breakpoint_list -i 5
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="5"><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="3" state="enabled" hit_count="0" hit_value="0" id="113200001"></breakpoint><breakpoint type="line" filename="file:///C:/Program%20Files/OpenServer/domains/smart-search.ru/search.php" lineno="4" state="enabled" hit_count="0" hit_value="0" id="113200002"></breakpoint></response>

[11320] <- breakpoint_set -i 6 -t exception -x Notice
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="113200003"></response>

[11320] <- breakpoint_set -i 7 -t exception -x Warning
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="113200004"></response>

[11320] <- breakpoint_set -i 8 -t exception -x Error
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="113200005"></response>

[11320] <- breakpoint_set -i 9 -t exception -x Exception
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="113200006"></response>

[11320] <- breakpoint_set -i 10 -t exception -x *
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="113200007"></response>

[11320] <- run -i 11
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="11" status="stopping" reason="ok"></response>

[11320] <- stop -i 12
[11320] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="12" status="stopped" reason="ok"></response>

[11320] Log closed at 2021-01-12 11:24:51

Ответы (0 шт):