900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > wampserver 调试 php phpstrom+wampserver+xdebug配置

wampserver 调试 php phpstrom+wampserver+xdebug配置

时间:2018-09-19 04:47:52

相关推荐

wampserver 调试 php phpstrom+wampserver+xdebug配置

1. xdebug

我自己的wampserver 3.0已经集成了xdebug扩展,只需在php.ini将其配置成如下即可:

[xdebug]

zend_extension ="D:/wamp/bin/php/php7.0.10/zend_ext/php_xdebug-2.4.1-7.0-vc14-x86_64.dll"

xdebug.default_enable=on

xdebug.collect_params=on

xdebug.collect_return=on

xdebug.max_nesting_level=100

xdebug.profiler_enable=on

xdebug.remote_enable=on

xdebug.remote_host=localhost

xdebug.remote_port=9000

xdebug.remote_handler=dbgp

xdebug.remote_connect_back=on

xdebug.idekey=PHPSTORM

xdebug.collect_vars=on

xdebug.profiler_enable_trigger_value=PHPXDEBUG

xdebug.profiler_enable_trigger=1

xdebug.show_mem_delta = 1

xdebug.trace_format = 1

xdebug.auto_trace=on

xdebug.trace_output_dir=D:\wamp\tmp\xdebug

xdebug.profiler_output_dir=D:\wamp\tmp\xdebug

2. phpstrom设置

2.1 CLI解释器配置

在File>Settings>PHP设置如下(我自己用的是php7):

image.png

添加解释器要确认xdebug已启用:

image.png

2.2 设置server

image.png

2.3 设置XDebug

image.png

2.4 设置DBGp Proxy

image.png

2.5 配置web Application

image.png

3 断点调试

image.png

4 调试相关操作

step into:单步执行,遇到子函数就进入并且继续单步执行

step over:在单步执行时,在函数内遇到子函数时不会进入子函数内单步执行,而是将子函数整个执行完再停止,也就是把子函数整个作为一步。

step out:当单步执行到子函数内时,用step out就可以执行完子函数余下部分,并返回到上一层函数。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。