以下是在CentOS上配置PhpStorm远程调试的步骤:
sudo yum install php-devel php-pear安装必要工具。sudo pecl install xdebug安装Xdebug。php.ini文件,添加zend_extension=xdebug.so、xdebug.mode=debug、xdebug.client_host=<本地IP>、xdebug.client_port=9003、xdebug.start_with_request=yes等配置。Settings中选择Languages & Frameworks→PHP,在CLI Interpreter处添加远程PHP解释器路径。PHP→Servers中添加新服务器,填写名称、主机名、端口等,与php.ini中配置一致。PHP→Debug中,确保Debug port与php.ini中xdebug.client_port一致。Shift+F9启动调试。