ubuntu 安裝phpstorm+xdebug 動態調試環境

ubuntu 安裝phpstorm+xdebug 動態調試環境

安裝vmware虛擬機和ubuntu18.04php

  • 安裝ifconfig apt install net-tools
  • 升級更新系統 apt-get update apt-get upgrade

安裝 php+apche+mysqlmysql

  • 安裝apache2 apt-get install apache2
  • 安裝php add-apt-repository ppa:ondrej/php

apt-get install php5.6 apt-get install libapache2-mod-php5.6web

  • 安裝mysql apt-get install mysql-server mysql-clientsql

    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');    安裝phpstorm+xdebug
  • 安裝phpstorm+jdkapache

    安裝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-xdebugubuntu

    php -v 查看xdebug是否安裝成功

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 = PHPSTORMphpstorm

配置phpstorm:ide

File-setting-phpdebug

ubuntu 安裝phpstorm+xdebug 動態調試環境
ubuntu 安裝phpstorm+xdebug 動態調試環境ubuntu 安裝phpstorm+xdebug 動態調試環境
ubuntu 安裝phpstorm+xdebug 動態調試環境
ubuntu 安裝phpstorm+xdebug 動態調試環境
ubuntu 安裝phpstorm+xdebug 動態調試環境
ubuntu 安裝phpstorm+xdebug 動態調試環境
調試demo
ubuntu 安裝phpstorm+xdebug 動態調試環境3d

注意:phpstorm啓動不要用root權限啓動

相關文章
相關標籤/搜索