2

I spent some good hours trying to setup xdebugger to work with PhpStorm 2016.2 with no success. And by that I mean, the breakpoints do not work at all.

I'm running AMPPS on windows for PHP 5.6 server. Yes, I am restarting Apache at every modification on the php.ini file.

I'll put some screenshots of relevant stuff on the hope that someone can spot a mistake.

And here is the error from xdebug:

Log opened at 2016-11-14 19:39:56 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-11-14 19:39:56

PhpStorm config screen

Xdebug php.ini configs

If someone could help me on this, I would be very greatful. At this point I feel like I've tried everything.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Fabio Baldissera
  • 583
  • 1
  • 4
  • 15
  • 1
    Do not use xdebug 2.5 RC on Windows -- it does not work right now. **Use xdebug stable 2.4.1** for now - as simple as this. http://stackoverflow.com/a/40803303/783119 – LazyOne Nov 25 '16 at 11:14

1 Answers1

1
  • Go to Run -> Edit Configurations.

  • Click on the "+" symbol, and go to PHP Remote Debug.

  • Fill the "name" field and pick your server from the "Servers" combo (create a new server if you did not already) .

  • Set "PHPSTORM" as your ide key.

Then go to https://www.jetbrains.com/phpstorm/marklets/ and save the marklets as a bookmark in your browser. Activate the DEBUG one before debugging.

Then it should work, set a breakpoint and start the debug session with the bug button having your server selected in the upper right combo, or from Run -> Debug.

Your apache config looks fine to me.

Hope it helps, feel free to comment if not!

  • Thank you so much for looking into it! Unfortunatelly, I had no luck with it. What really "solved" for me, was to copy the dll that I was using in my other PC. I will paste it here (the configs with the version of xdebugger), just for the documentation: zend_extension = "C:\Program Files (x86)\Ampps\php\ext\php_xdebug-2.4.0-5.6-vc11.dll" xdebug.remote_enable=true xdebug.remote_host=local.piperun xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_enable=1 xdebug.remote_autostart = 1 With those configurations, no extra setup is needed. Thanks – Fabio Baldissera Nov 15 '16 at 21:54