ubuntu 安装PHPstorm+xdebug 动态调试环境
在PHP.ini中配置:
zend_extension = /usr/lib/PHP/20170718/xdebug.so
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir="/tmp/xdebug"
xdebug.profiler_enable=on
xdebug.profiler_output_dir="/tmp/xdebug"
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
调试demo
安装vmware虚拟机和ubuntu18.04
apt-get install PHP5.6 apt-get install libapache2-mod-PHP5.6
-
安装MysqL apt-get install MysqL-server MysqL-client
SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘123456‘); 安装PHPstorm+xdebug
-
安装PHPstorm+jdk
安装jdk: apt install default-jre 安装PHPstorm 下载安装包:https://download-cf.jetbrains.com/webide/PHPStorm-2018.2.3.tar.gz 复制到虚拟机解压,执行 ./bin/PHPstorm.sh 安装
-
安装xdebug apt-get install PHP-xdebug
PHP -v 查看xdebug是否安装成功
在PHP.ini中配置:
zend_extension = /usr/lib/PHP/20170718/xdebug.so
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir="/tmp/xdebug"
xdebug.profiler_enable=on
xdebug.profiler_output_dir="/tmp/xdebug"
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
配置PHPstorm:
File-setting-PHP
调试demo
注意:PHPstorm启动不要用root权限启动
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。