Essential Articles on Remote PHP Debugging with PHPStorm and Xdebug



Enable remote xdebug in php.ini 

you will add a line in php.ini


Test your connection, if it doesn’t work with localhost, try you local network IP address as it depends to which network adapter PHPStorm is using for the debugging purposes.


Mac-Pro:~ mac$ telnet localhost 9000

Trying ::1…

telnet: connect to address ::1: Connection refused


Connected to localhost.

Escape character is ‘^]’.


telnet> exit

?Invalid command

telnet> quit

Connection closed.

Mac-Pro:~ mac$ telnet 9000


Connected to

Escape character is ‘^]’.

Screenshot of website using php on linux using PhantomJS WebKit

Main project page



Setup your environment


Setup phantomjs on Amazon EC2 instance


Setup your script


Capture webpage screenshot using PHP and Phantomjs


Additional reading on the PhantomJS