martomo / SublimeTextXdebug

Xdebug debugger client for Sublime Text
MIT License
564 stars 89 forks source link

Connection succeeds and then immediately fails #199

Open kevinforrestconnors opened 5 years ago

kevinforrestconnors commented 5 years ago

I am trying to run Xdebug with Sublime Text 3 on my Mac. Our projects are on remote shares, and I opened the project with Sublime. Sublime is running on my local computer. Port 9000 is being used and is open when the debugger is running. The connection succeeds initially and then fails.

I have tried all of the "fixes" that worked for other people that experienced the error message "Creating socket for '10.10.0.169:9000', poll success, but error: Operation now in progress (29).", but none worked, probably because my environment is different.

I know that Xdebug is working. It works for other users, who use PhpStorm, and it works on the project I'm testing it on. I also have used Xdebug with no issues with PhpStorm. Therefore I think this is a Sublime configuration issue, or possibly a bug.

Environment

Sublime Text

Operating system: macOS Mojave 10.14.5 Installed version/build: Version 3.2.1, Build 3207 Python version: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) [Clang 6.0 (clang-600.0.57)] Local version

2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] Version on server

Server

Operating system: CentOS Linux release 7.6.1810 (Core) Are you trying to debug the script remotely or locally? Remotely

PHP/Xdebug version: PHP 7.0.33 (cli) (built: May 28 2019 09:26:45) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans

Configuration

php.ini/xdebug.ini

zend_extension=xdebug.so

xdebug.remote_enable = on

xdebug.remote_autostart = off
xdebug.remote_handler = dbgp
xdebug.remote_port = 9000
xdebug.remote_server = localhost
xdebug.remote_mode = req
xdebug.remote_connect_back = 1

;turn off stack traces
xdebug.default_enable = 0
;turn off var_dump override
xdebug.overload_var_dump = 0

xdebug.remote_log=/home/apache/logs/xdebug_log

Packages/User/Xdebug.sublime-settings

    "url": "<PROPRIETARY, INTERNAL URL>",
    "ide_key": "netbeans-xdebug"
}

*.sublime-project

    "folders":
    [
        {
            "path": "."
        },
        {
            "path": "/Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME 1>"
        },
        {
            "path": "/Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME 2>"
        },
        {
            "path": "/Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME 3>"
        },
        {
            "path": "/Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME 3>"
        }
    ],
    "settings": {
        "xdebug": {
            "url": "<PROPRIETARY, INTERNAL URL>",
            "ide_key": "netbeans-xdebug"
        }
    }
}

Logs

Console output: none

Packages/User/Xdebug.log:

[16729] Log opened at 2019-07-02 15:07:55
[16729] I: Checking remote connect back address.
[16729] I: Checking header 'HTTP_X_FORWARDED_FOR'.
[16729] I: Checking header 'REMOTE_ADDR'.
[16729] I: Remote address found, connecting to 10.10.0.169:9000.
[16729] I: Connected to client. :-)
[16729] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/<LIBRARY NAME>_library_prepend/<LIBRARY NAME>_prepend.v14.inc.php" language="PHP" xdebug:language_version="7.0.33" protocol_version="1.0" appid="16729" idekey="netbeans-xdebug"><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>
[16729]
[27241] Log opened at 2019-07-02 15:07:55
[27241] I: Checking remote connect back address.
[27241] I: Checking header 'HTTP_X_FORWARDED_FOR'.
[27241] I: Checking header 'REMOTE_ADDR'.
[27241] I: Remote address found, connecting to 10.10.0.169:9000.
[27241] W: Creating socket for '10.10.0.169:9000', poll success, but error: Operation now in progress (29).
[27241] E: Could not connect to client. :-(
[27241] Log closed at 2019-07-02 15:07:55
[27241]
[16729] <- feature_set -i 1 -v 1 -n show_hidden
[16729] -> <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>
[16729]
[16729] <- feature_set -i 2 -v 32 -n max_children
[16729] -> <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>
[16729]
[16729] <- feature_set -i 3 -v 1024 -n max_data
[16729] -> <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>
[16729]
[16729] <- feature_set -i 4 -v 1 -n max_depth
[16729] -> <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>
[16729]
[16729] <- breakpoint_set -i 5 -t line -n 35 -f file%3A///Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME>/index.php
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="167290122"></response>
[16729]
[16729] <- breakpoint_set -i 6 -t line -n 30 -f file%3A///Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME>/plugins/genericobject/front/field.form.php
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="167290123"></response>
[16729]
[16729] <- breakpoint_set -i 7 -t line -n 31 -f file%3A///Volumes/<SERVER NAME>/sandbox/kevin/<PROJECT NAME>/plugins/genericobject/front/field.form.php
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="167290124"></response>
[16729]
[16729] <- breakpoint_set -i 8 -x "Fatal error" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="167290125"></response>
[16729]
[16729] <- breakpoint_set -i 9 -x "Catchable fatal error" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="167290126"></response>
[16729]
[16729] <- breakpoint_set -i 10 -x "Warning" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="167290127"></response>
[16729]
[16729] <- breakpoint_set -i 11 -x "Parse error" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="11" id="167290128"></response>
[16729]
[27238] Log opened at 2019-07-02 15:07:55
[27238] I: Checking remote connect back address.
[27238] I: Checking header 'HTTP_X_FORWARDED_FOR'.
[27238] I: Checking header 'REMOTE_ADDR'.
[27238] I: Remote address found, connecting to 10.10.0.169:9000.
[27238] W: Creating socket for '10.10.0.169:9000', poll success, but error: Operation now in progress (29).
[27238] E: Could not connect to client. :-(
[27238] Log closed at 2019-07-02 15:07:55
[27238]
[16729] <- breakpoint_set -i 12 -x "Notice" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="167290129"></response>
[16729]
[16729] <- breakpoint_set -i 13 -x "Strict standards" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="13" id="167290130"></response>
[16729]
[16729] <- breakpoint_set -i 14 -x "Deprecated" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="14" id="167290131"></response>
[16729]
[16729] <- breakpoint_set -i 15 -x "Xdebug" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="15" id="167290132"></response>
[16729]
[16729] <- breakpoint_set -i 16 -x "Unknown error" -t exception
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="16" id="167290133"></response>
[16729]
[16729] <- run -i 17
[16729] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="17" status="stopping" reason="ok"></response>
[16729]
[16729] Log closed at 2019-07-02 15:07:55
[16729]