Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jakub.kratina's avatar

Problems with Xdebug & PHPStorm

Hello guys,

i'm using PHPStorm and trying to run Xdebug according this video https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20?autoplay=true.

First part works perfectly (https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/19?autoplay=true), but i'm stuck at second one.

Port 9000 was not working, so i changed it to 10000.

I configured PHP Web Application configuration ( http://jakubkratina.cz/laravel/servers.png and http://jakubkratina.cz/laravel/debug-configuration.png ) and after i press debug button, web is blank ( http://jakubkratina.cz/laravel/browser.png ) and still loading and PHPStorm is waiting for incoming connection ( http://jakubkratina.cz/laravel/phpstorm.png ).

I have checked "can accept external connection" at PHP - Debug - Xdebug and xdebug in php.ini configured like this:

[XDebug]
zend_extension="/usr/local/Cellar/php56-xdebug/2.3.3/xdebug.so"

xdebug.remote_enable = 1
xdebug.cli_color = 1
xdebug.show_local_vars = 1

xdebug.remote_port = 10000
xdebug.remote_host= localhost
xdebug.remote_autostart = 1

xdebug.remote_log="/usr/local/tmp/xdebug.log"
xdebug.idekey = "PHPSTORM"
xdebug.ide_key = "PHPSTORM"
xdebug.profiler_enable = 1
xdebug.profiler_output_dir="/usr/local/tmp/xdebug-profiler"
xdebug.profiler_enable_trigger = 1

I tried to validate web server with this result: http://jakubkratina.cz/laravel/validate.png

I was googling and trying solve this for 4 hours, try to help me please, i`m kind of dummy in this.

What I am doing wrong?

Thank you so much!

0 likes
10 replies
PLB-RR's avatar

@wise I think you are not debugging on localhost according to your screenshots (btw. you have a ) in the url of your screenshots, so they are not working when clicked).

Perhaps you have to enter your ip address @ xdebug.remote_host= localhost instead of localhost.

And I see your ide key is different in your xdebug config then the connection where PHPstorm is waiting for. Maybe this makes a difference also?

jakub.kratina's avatar

@PLB-RR : added spaces before brackets. You mean 127.0.0.1? Or my network IP? I want to debug on localhost (i think). Thank you for the patience.

PLB-RR's avatar

@wise See it now :-) Have to go to bed I guess.

Are you running your app on a virtual machine? Or just a local webserver?

PLB-RR's avatar

@wise I activated xdebug remote debugging also in PHPstorm. Works without problems here. Xdebug config

zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.scream=0
xdebug.max_nesting_level = 250
xdebug.cli_color=1
xdebug.show_local_vars=1

I created a new PHP Web application, selected my server and gave root url / and selected default browser. Browser opens in white screen and keeps loading. When I switch back to PHPstorm I can debug. But I checked under "run" break at first line in PHP scripts.

Screenshot of my PHP web application: Alt text

And then I select it in the right top and press the bug: Alt text

jakub.kratina's avatar

There has to be some error in my configuration or using. We know, that simple file debug is working, but when i try to debug in browser, it's not.

Maybe some error with port 10000? At your screen is URL "app.shizzle" (btw. how did you assign image directly?) and at my screen its "online-chef.dev:10000" and when i run this URL directly its not working (ERR_CONNECTION_REFUSED). But i can't use port 9000 (dont know why, just not working).

jakub.kratina's avatar

What port are you using in your configuration?

I tried to set port to 4381 (which was opened for localhost) and in apache set this port as listened. Now, when i run debug, storm says "Port 4381 is busy".

I can see now, it's used by httpd service (as i configured), when i hit Debug button.

jakub.kratina's avatar

I reinstalled xdebug and the main thing was that I run web with port 9000 instead 80 or 8080, etc. Thank you for your help, now everything is okey.

Please or to participate in this conversation.