2016-12-01 4 views
4

Может ли кто-нибудь пролить свет на то, почему я получаю «Отключение нового сеанса» из PHP Debug с помощью Atom?Почему я получаю «Отключение нового сеанса» от PHP Debug с помощью Atom

Я установил xdebug, и Apache распознает, что он установлен, я использую расширение для включения отладки из Firefox, но внутри Atom я получаю сообщение об ошибке, и иногда я не получаю ошибку, но отладчик все еще не прерывает , Я устранил брандмауэр Windows как проблему, но теперь я застрял.

Вот установка из моего php.ini:

;xdebug 
zend_extension = C:\xampp\php\ext\php_xdebug-2.5.0rc1-5.6-vc11.dll 
xdebug.remote_enable=on 
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=9000 
xdebug.remote_handler=dbgp 
xdebug.remote_mode=req 
xdebug.idekey=atom-xdebug 
xdebug.remote_autostart=off 
xdebug.remote_log = C:\xampp\php\logs\xdebug.log 

Вот настройки из config.cson:

"*": 
    core: 
    telemetryConsent: "limited" 
    editor: 
    fontSize: 16 
    "exception-reporting": 
    userId: "8729c4aa-3989-14fa-78e9-968504643693" 
    "php-debug": 
    currentPanelMode: "bottom" 
    welcome: 
    showOnStartup: false 
"php-debug": 
    PathMaps: [ 
    "remotepath;localpath" 
    "localhost:8080/rdportal/index.php;C:\\xampp\\htdocs\\rdportal" 
    ] 
    ServerPort: 9000 

Это журнал ошибок, я получаю:

Log opened at 2016-12-01 03:43:41 
I: Connecting to configured address/port: localhost:9001. 
W: Creating socket for 'localhost:9001', WSAPoll: 10022. 
W: Creating socket for 'localhost:9001', WSAPoll: 10022. 
E: Could not connect to client. :-(
Log closed at 2016-12-01 03:43:41 

Основываясь на журнале ошибок, I disco что xdebug 2.5 RC был испорчен, и поэтому я теперь понижен до версии 2.4.1 из DLL-файла, и теперь вместо «нового сеанса отклонено» я получаю «инициированный сеанс» - я перезагрузил порт обратно до 9000 в соответствии с по умолчанию, но по-прежнему нет точки останова. Вместо того, чтобы журнал ошибок теперь содержит:

Log opened at 2016-12-01 04:11:32 
I: Connecting to configured address/port: 127.0.0.1:9000. 
I: Connected to client. :-) 
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/xampp/htdocs/rdportal/index.php" language="PHP" xdebug:language_version="5.6.1-dev" protocol_version="1.0" appid="6764" idekey="atom-xdebug"><engine version="2.4.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init> 

<- feature_set -i 1 -n "show_hidden" -v 1 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response> 

<- feature_set -i 2 -n "max_depth" -v 4 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response> 

<- feature_set -i 3 -n "max_data" -v 1024 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_data" success="1"></response> 

<- feature_set -i 4 -n "max_children" -v 32 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="max_children" success="1"></response> 

<- feature_set -i 5 -n "multiple_sessions" -v 0 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="multiple_sessions" success="1"></response> 

<- breakpoint_set -i 6 -t "line" -f "file://localhost:8080/rdportal/index.php/index.php" -n 134 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="67640073"></response> 

<- breakpoint_set -i 7 -t "exception" -x "Fatal error" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="67640074"></response> 

<- breakpoint_set -i 8 -t "exception" -x "Catchable fatal error" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="67640075"></response> 

<- breakpoint_set -i 9 -t "exception" -x "Warning" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="67640076"></response> 

<- breakpoint_set -i 10 -t "exception" -x "Strict standards" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="67640077"></response> 

<- breakpoint_set -i 11 -t "exception" -x "Xdebug" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="11" id="67640078"></response> 

<- breakpoint_set -i 12 -t "exception" -x "Unknown error" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="67640079"></response> 

<- breakpoint_set -i 13 -t "exception" -x "Notice" 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="13" id="67640080"></response> 

<- run -i 14 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="14" status="stopping" reason="ok"></response> 

<- stop -i 15 
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="15" status="stopped" reason="ok"></response> 

Log closed at 2016-12-01 04:11:32 

Это теперь ток config.cson:

"*": 
    core: 
    telemetryConsent: "limited" 
    editor: 
    fontSize: 16 
    "exception-reporting": 
    userId: "8729c4aa-3989-14fa-78e9-968504643693" 
    "php-debug": 
    PathMaps: [ 
     "C:\\xampp\\htdocs\\rdportal;localhost:8080/rdportal/index.php" 
    ] 
    PhpException: 
     CatchableFatalError: false 
     Deprecated: false 
     FatalError: false 
     Notice: false 
     ParseError: false 
     StrictStandards: false 
     UnknownError: false 
     Warning: false 
     Xdebug: false 
    currentPanelMode: "bottom" 
    welcome: 
    showOnStartup: false 

и это раздел Xdebug из php.ini:

;xdebug 
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.1-5.6-vc11.dll 
xdebug.remote_enable=1 
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=9000 
xdebug.remote_handler=dbgp 
xdebug.remote_mode=req 
xdebug.remote_autostart=0 

ответ

1

Хорошо, поэтому я обнаружил, что проблема - это мои дорожные карты - они были неправильными. Таким образом, в целом, загрузка 2.5 не является надежной, а пул Path Map относится к локальным файлам, а локальная часть относится к файлам веб-сайта ... возможно, это мое недоразумение, но это кажется мне очень странным! Во всяком случае, проблема исправлена.

+0

Im сталкивается с той же проблемой. Можете ли вы опубликовать, как ваш конфигурационный файл выглядит новым? – undroid

+1

Конечно, но это на моей рабочей машине, так что это будет завтра. – beliskna

+0

@beliskna любой шанс вы могли опубликовать конфигурацию и более подробно описать, что вам нужно было сделать? Благодаря! – razvanz