Debug with PhpStorm: Ultimate Guide | PhpStorm

Depending on your environment, you can debug your PHP Web application locally or remotely.

Otherwise, if direct connection cannot be established, follow the Remote debugging via SSH tunnel procedure.

If you can establish direct connection between your machine and the remote server, that is, no firewall, router or ISP is blocking the connection from your remote server to the specific port on the local machine, follow the Zero-configuration debugging procedure.

The debugging engine is running on a remote environment (for example, a remote server or a virtual machine).

The debugging engine and PhpStorm are running on the same machine.

To test direct connection, run the telnet host 9000 (for Xdebug) or the telnet host 10137 (for Zend Debugger) command on the remote server and ensure that connection is established. Here, host is the IP address of the local machine PhpStorm is running on.

To check for opened inbound ports, you can use canyouseeme.org or a similar service.