作者:rsidugjig | 来源:互联网 | 2023-08-23 17:49
例如wamp3.10安装在D:\Server\wamp64中,打开D:\Server\wamp64\bin\apache\apache2.4.27\bin\php.ini,找到x
例如wamp 3.10 安装在"D:\Server\wamp64"中,打开"D:\Server\wamp64\bin\apache\apache2.4.27\bin\php.ini",找到xdebug配置节,改为如下所示,然后重启服务:
; XDEBUG Extension
[xdebug]
zend_extension ="D:/Server/wamp64/bin/php/php5.6.31/zend_ext/php_xdebug-2.5.5-5.6-vc11-x86_64.dll"
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="D:/Server/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.remote_port=19000
xdebug.idekey="PHPSTORM"
wordpress放在目录"D:\Server\wamp64\www\wordpress",可通过"http://localhost/wordpress"访问,用PhpStorm打开此目录,作为php web page项目加载:
配置PHP服务器:
编辑"Run/Debug Configurations",并选中上面创建的PHP服务器:
然后下断点,就可以调试wordpress的php代码了: