This article will let you perform real-time debugging of an Acquia Cloud environment's code, using both the PhpStorm IDE and the Remote Xdebug method.
Before getting started with Remote Xdebug in Acquia Cloud, contact Acquia Support and request that Xdebug and Xdebug remote be enabled, and state which environments you'd like them enabled on. Be aware that enabling Xdebug may slow performance for the environments that it is enabled on.
Once you receive confirmation from the support team that both of these are enabled, complete the following steps to start remotely debugging your codebase.
9003
). If you aren't running the default port, or you're not sure what port is configured, you can find out by using this code, from the UNIX command line, to find out:
for conf in `find /var/www/site-php -name php.ini 2>/dev/null`; do echo "--- Checking $conf ---"; php -c $conf -i 2>/dev/null | grep xdebug.client_port; echo; done
ssh -R 9003:localhost:9003 [email protected]
~/.ssh/config
file on your local server, and then use the command ssh xdebug-dev
from the command line.Host xdebug-dev
Hostname server.prod.hosting.acquia.com
User username
Port 22
ServerAliveInterval 60
IdentityFile ~/.ssh/id_rsa
RemoteForward 9003 localhost:9003
netstat -nlt | grep 9003
9003
" with whichever port you've configured):9003
.Once these steps are complete, you may start using breakpoints and debugging. Discussing this is beyond the scope of this document; just remember you will need to:
For more information, you can visit Zero-Configuration Debugging at the PhpStorm documentation site.
Remote file path '/mnt/www/site-scripts/prepend.php' is not mapped to any file path in project
If you have multiple web servers (this is true of Acquia Cloud Classic), then you need to ensure that requests are routed to the one that you have Xdebug set up on.
All Acquia Cloud environments have caching and some are powered by multiple web servers; this may result in requests not triggering Xdebug on the web server you’ve connected to. You can ensure your requests route to the same backend by additionally forwarding HTTP to the server. (We use the environment name “example
” in these instructions.)
First, change the the SSH command we discussed previously to add a port forward for HTTP as well:
ssh -R 9003:localhost:9003 -L 127.0.0.1:8080:example.prod.acquia-sites.com:80 [email protected]
Second, modify /etc/hosts
on your local machine to use this port forward by adding the following line:
127.0.0.1 example.prod.acquia-sites.com
Third, configure our server in PHPStorm to use the non-standard port (8080
) :
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Oct 22 2025 08:59:29 GMT+0000 (Coordinated Universal Time)