XDebug could not connect to client

后端 未结 3 821
忘掉有多难
忘掉有多难 2020-12-31 05:47

I am trying to debug with NetBeans Mac locally.

This is my php.ini

[xdebug]
 xdebug.default_enable=1
 xdebug.remote_enable=1
 xdebug.remote_handler=d         


        
相关标签:
3条回答
  • 2020-12-31 05:59

    Step 1: Change xdebug.remote_port=9000 to xdebug.remote_port=9001

    Step 2:

    1. Change the debugging port in Netbeans. Go to Tools >> Options >> Click PHP tab
    2. Under PHP tab click debugging
    3. Change the debugger port : 9001
    4. Change Session ID : netbeans-xdebug

    Step 3: Restart server and netbeans

    Step 4: Set a breakpoint and try

    0 讨论(0)
  • 2020-12-31 06:07

    I had exact the same problem. The xdebug installion wizard (https://xdebug.org/wizard.php) showed that my xdebug was correctly installed. (The wizard told me to install the Xdebug 2.5.0rc1 dll) In phpinfo I also got a xdebug section showing (in my opinion) the correct values. Even with this I got a "could not connect to client" message in the error log.

    Eventually I solved it by trial and error doing the following: Downloaded all the older versions of the xdebug dll's for my php version and tried them all. Eventually one of them worked. For me it was with php 5.6.8 the xdebug 2.4.1 dll (PHP 5.6 VC11 TS (32 bit) ) on a windows 7 32 bit machine. I am using xampp-win32-5.6.8-0-VC11.zip for my xampp installation.

    What I learned was the following: (a) The Xdebug wizard does not neccesarily give the correct dll to use (b) Even though phpinfo shows a Xdebug section with correct variables this does not necessarily mean that it is correct. (c) Try older versions of the dll's if you get this error.

    0 讨论(0)
  • 2020-12-31 06:14

    Xdebug's default port (9000) conflicts with FastCGI (Xdebug was first!) - the solution is to change it to another port. After having done that, you need to restart your IDE where you will also need to configure the new port. You will also need to restart PHP and your Web Server.

    0 讨论(0)
提交回复
热议问题