0

I'm using XAMPP and PHP-Debug package for Atom IDE and download xdebug dll file.

this is my php.ini xdebug :

[xdebug]
zend_extension="C:\xampp\php\ext\php_xdebug-2.7.2-7.3-vc15-x86_64.dll"
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_connect_back=0    # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.remote_autostart=1
xdebug.remote_log="C:\Users\mehra\Documents\xdebug.log"

and using XAMPP and ATOM IDE for run a simple script but I get this error :

[12120] Log opened at 2019-08-08 13:36:30
[12120] I: Connecting to configured address/port: localhost:9000.
[12120] E: Time-out connecting to client (Waited: 200 ms). :-(
[12120] Log closed at 2019-08-08 13:36:30
[12120]

I see someone suggest to changexdebug.remote_autostart=1 to xdebug.remote_autostart=0 and read xdebug Time-out connecting to client. :-( using phpstorm 7.1.3/vagrant/virtualbox/magento but still doesn't work

PHP-debugger setting :

enter image description here

7
  • 1) Check firewall rules -- ensure that Atom (or how that debugger package inside the Atom works) is allowed to accept connections on TCP 9000 port. 2) Make it listening to debug connections (not using Atom myself so cannot give instructions on that) and then check with netstat or similar tool that it actually listens on TCP 9000 port. 3) Maybe try 127.0.0.1 instead of localhost (sometimes makes the difference, especially if IPv6 has priority over IPv4) Commented Aug 8, 2019 at 14:51
  • @LazyOne 1)i turn off firewall 2) i read a guide in atom web site about this(atom.io/packages/php-debug) dubegger config is so simple and there is nothing in port 9000(netstat) 3) i changed it to 127.0.0.1 and still doesn't work Commented Aug 8, 2019 at 18:15
  • 1
    "and there is nothing in port 9000(netstat) " For me this clearly suggests that you have missed some point from the manual (e.g. #3 from the manual)... and Atom is no yet listening for incoming debug requests from Xdebug. if it's not listening (for whatever reason).. then no wonder that Xdebug is unable to connect. Commented Aug 8, 2019 at 18:56
  • 1
    ?? Why do you think it's Xdebug issue? I do not see anywhere in that link that would say "xdebug bug"... P.S. I hope you understand the difference between Xdebug (PHP extension) and Php Debug (debug extension for Atom). Commented Aug 9, 2019 at 8:09
  • 1
    "Atom ide use php debug and php debug use xdebug extension php debug and xdebug are same from the atom user perspective" Nope. "Php Debug" is an Atom package .. that works with Xdebug. A bug or misconfiguration in Php Debug Atom package does not mean a bug or misconfiguration in Xdebug PHP extension. Commented Aug 9, 2019 at 13:40

1 Answer 1

1

after so many try i solved my problem with some change:

1-File->Settings->Packages->ide-php

PHP Path :C:\xampp\php\php.exe

2-php.ini:

zend_extension="C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=0    # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.remote_autostart=1
xdebug.remote_log="C:\Users\mehra\Documents\xdebug.log"
xdebug.idekey =xdebug-atom

3-install xdebug helper extension for chrome or Firefox :

enter image description here

4- enter image description here

5-and change path mapping in php-debug package to [{"remotePath":"C:/xampp/htdocs","localPath":"C:/xampp/htdocs"}]

6-click on php debug icon and refresh Chrome or Firefox(with alt+F9 in your code) : enter image description here

https://www.imprich-create.site/archives/366

Sign up to request clarification or add additional context in comments.

1 Comment

Small note: If you have xdebug.remote_autostart=1 then you do not need Xdebug browser helper -- with that option Xdebug will try to debug every single request regardless of the presence or absence of Xdebug COOKIE that such browser extensions adds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.