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
- 安装ifconfig apt install net-tools
- 升级更新系统 apt-get update apt-get upgrade
安装 php+apche+mysql
- 安装apache2 apt-get install apache2
- 安装php add-apt-repository ppa:ondrej/php
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权限启动
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。