0
votes

I use WAMP locally and Atom as my editor. I want to use Xdebug, so I installed the php-debug package in Atom. In Chrome I have installed the addon "Xdebug Helper" to turn off and on Xdebug with a simple button and I also added the IDE key xdebug-atom in the settings.

I added these lines in php.ini for xdebug:

zend_extension ="c:/wamp/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11.dll"
xdebug.remote_enable=1
xdebug.idekey = "xdebug-atom"
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1    
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=false

And in Atom I added these lines in config.cson:

  "php-debug":
    ServerAddress: "127.0.0.1"
    ServerPort: 9000
    currentPanelHeight: "292px"
    currentPanelMode: "bottom"

I can toggle the Xdebug window in Atom and also set a breakpoint in my php script. But nothing happens when I reload my web application, I have tried changing all settings and rebooted both Atom and WAMP several times.

Can anyone see what I am doing wrong?

1
1) Check what xdebug log has to say about it (xdebug.remote_log) -- does it even try to connect? 2) Is xdebug actually installed? Maybe you have edited the wrong php.ini etc --- please check your phpinfo() output captured via browser. 3) BTW -- with xdebug.remote_connect_back=1 the value of xdebug.remote_host will be ignored. - LazyOne
Thanks LazyOne, I finally got it to work and edited my solution above in the question. - TBJ
Better put it as an answer -- it will then be clear that it's a working solution. - LazyOne

1 Answers

0
votes

Finally I got it right. With these settings in php.ini the connection works:

zend_extension ="c:/wamp/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11.dll"
xdebug.remote_enable = On
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.remote_autostart = 0
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000