
正文
ubuntu 安装php xdebug
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
windows 安装xdebug https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
一.下载
下载与PHP版兼容的Xdebug扩展,并将其保存在php /文件夹中。
php /文件夹 的位置是在PHP引擎安装期间定义的。
如果您使用的是AMP软件包,则可能已安装Xdebug扩展。按照xdebug.txt中的说明进行操作
二. 将Xdebug与PHP解释器集成 在php.in加入
[XDebug]
zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM
xdebug.show_error_trace = 1
;指定Xdebug扩展文件的绝对路径
;启用性能检测分析
xdebug.profiler_enable=On
;启用代码自动跟踪
xdebug.auto_trace=on
;允许收集传递给函数的参数变量
xdebug.collect_params=On
;允许收集函数调用的返回值
xdebug.collect_return=On
;指定堆栈跟踪文件的存放目录
xdebug.trace_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.profiler_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10
liunux安装php xdebug
http://xdebug.org/install.php#configure-php
A list of all settings: http://xdebug.org/docs-settings.php
A list of all functions: http://xdebug.org/docs-functions.php
Profiling instructions: http://xdebug.org/docs-profiling2.php
Remote debugging: http://xdebug.org/docs-debugger.php
一、下载并编译 xdebug
下载与PHP版兼容的Xdebug扩展,并将其保存在php /文件夹中。 php /文件夹 的位置是在PHP引擎安装期间定义的。 如果您使用的是AMP软件包,则可能已安装Xdebug扩展。按照xdebug.txt中的说明进行操作
二. 将Xdebug与PHP解释器集成 在php.in加入
[XDebug]
zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM
xdebug.show_error_trace = 1
;指定Xdebug扩展文件的绝对路径
;启用性能检测分析
xdebug.profiler_enable=On
;启用代码自动跟踪
xdebug.auto_trace=on
;允许收集传递给函数的参数变量
xdebug.collect_params=On
;允许收集函数调用的返回值
xdebug.collect_return=On
;指定堆栈跟踪文件的存放目录
xdebug.trace_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.profiler_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10
liunux安装php xdebug
http://xdebug.org/install.php#configure-php
A list of all settings: http://xdebug.org/docs-settings.php
A list of all functions: http://xdebug.org/docs-functions.php
Profiling instructions: http://xdebug.org/docs-profiling2.php
Remote debugging: http://xdebug.org/docs-debugger.php
一、下载并编译 xdebug
[XDebug]
zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM
xdebug.show_error_trace = 1
;指定Xdebug扩展文件的绝对路径
;启用性能检测分析
xdebug.profiler_enable=On
;启用代码自动跟踪
xdebug.auto_trace=on
;允许收集传递给函数的参数变量
xdebug.collect_params=On
;允许收集函数调用的返回值
xdebug.collect_return=On
;指定堆栈跟踪文件的存放目录
xdebug.trace_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.profiler_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10
http://xdebug.org/install.php#configure-php
A list of all settings: http://xdebug.org/docs-settings.php
A list of all functions: http://xdebug.org/docs-functions.php
Profiling instructions: http://xdebug.org/docs-profiling2.php
Remote debugging: http://xdebug.org/docs-debugger.php
一、下载并编译 xdebug
下载 xdebug 最新的源码包
wget https://xdebug.org/files/xdebug-2.6.0.tgz
解压缩
tar -zxvf xdebug-2.6..tgz
编译安装
cd xdebug-2.6.
phpize
./configure --enable-xdebug
make
make install
三、配置
-
在
/etc/php/7.2/mods-available/xdebug.ini加入
-
zend_extension=xdebug.so
extension=xdebug.so
xdebug.remote_enable =
xdebug.remote_port =
xdebug.idekey = PHPSTORM
xdebug.show_error_trace =
xdebug.remote_autostart =
xdebug.file_link_format = phpstorm://open?%f:%l
-
在php.ini中增加xdebug配置 xdebug.so路径 在安装完xdebug时控制台会有提示
zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM
xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10
-
增加软连接 //一下配置我并没有使用
cd /etc/php/7.2/fpm/conf.d/
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini -xdebug.ini
cd /etc/php/7.2/cli/conf.d/
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini -xdebug.ini
/etc/php/7.2/mods-available/xdebug.ini加入
zend_extension=xdebug.so
extension=xdebug.so
xdebug.remote_enable =
xdebug.remote_port =
xdebug.idekey = PHPSTORM
xdebug.show_error_trace =
xdebug.remote_autostart =
xdebug.file_link_format = phpstorm://open?%f:%l
zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM
xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10
cd /etc/php/7.2/fpm/conf.d/
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini -xdebug.ini
cd /etc/php/7.2/cli/conf.d/
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini -xdebug.ini
重启apache,检测是否安装成功:
$ sudo apachectl restart
$ php -m | grep xdebug







