在Debian中使用PHPStorm远程调试,可按以下步骤进行:
sudo apt-get install php-xdebug。php.ini文件,添加以下配置:[xdebug]
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.client_host=你的本地IP
xdebug.client_port=9003
xdebug.start_with_request=yes
xdebug.idekey=PHPSTORM
sudo systemctl restart apache2或sudo systemctl restart nginx。Settings(Ctrl+Alt+S),进入Languages & Frameworks > PHP > Servers,点击“+”添加新服务器,填写服务器名称、主机地址、端口等信息,并配置路径映射。Run > Edit Configurations,添加PHP Remote Debug配置,选择对应的服务器和端口。在代码中设置断点,点击PhpStorm工具栏上的电话图标(或按Shift+F9)启动调试会话,在浏览器中访问应用程序,触发断点即可进行调试。