user3857775
user3857775

Reputation:

How to use Xdebug in PhpStorm

I have a trouble to use debugger in my code, it's my first time to use debugger, I don't know that I am doing it the right way or not, but it is not working for me. it always show this message in variables section...

Waiting for incoming connection with ide key '13001'

I followed this step...

1. my php.ini setting for xdebug

[Xdebug]
zend_extension="D:\XAMMPI\php\ext\php_xdebug-2.4.0-5.6-vc11.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=80 //i also try the default port (9000) here but it still not working
xdebug.idekey=PHPSTORM

2. I create the configuration setting for Debugger.

configuration setting

3. I apply the break point to code for testing

break point place

I am using PhpStorm 2016.1

Any help will be appreciated

UPDATE - 1

enter image description here

Upvotes: 2

Views: 1297

Answers (2)

scireon
scireon

Reputation: 395

Just use my php.ini setting for xdebug

[XDebug]
zend_extension="D:\XAMMPI\php\ext\php_xdebug-2.4.0-5.6-vc11.dll" ; copied this link based on your config.
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=10000
xdebug.remote_autostart=1
xdebug.idekey=

Then install xDebug helper for chrome:

https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en

Then change the IDE key to phpstorm Change the IDE key to phpstorm

After that, you should create a PHP Remote Debug and not PHP Web Application

Like the picture below.

enter image description here

On your settings. Which can be accessed using Ctrl+Alt S. Search for Debug port, and change it to 10000.

enter image description here

After that you should navigate to your extension in chrome and activate xDebug.

enter image description here

And that's it. Happy Debugging :)

Upvotes: 5

michaJlS
michaJlS

Reputation: 2500

Waiting for incoming connection with ide key '13001'

vs

xdebug.idekey=PHPSTORM

you need to set proper idekey in PHPStorm, and change back ports to 9000. 80 is port for apache (http server), so it will not work as you've configured.

Look here to learn where to set the idekey in ide: https://www.jetbrains.com/help/phpstorm/2016.1/run-debug-configuration-php-remote-debug.html

Upvotes: 2

Related Questions