调试方法
方法名 | 作用 |
---|---|
step into | 如果该行有自定义方法,则进入方法内,否则执行下一行 |
step over | 如果当前行有方法调用,这个方法将被执行完毕返回,然后到下一行 |
step out | 当单步执行到子函数内时,用step out就可以执行完子函数余下部分,并返回到上一层函数 |
force step into | 能够进入所有的方法 |
run to cursor | 执行到光标处 |
xdebug的php.ini配置
zend_extension=xdebug.so
xdebug.remote_autostart = 1 //不依赖浏览器的插件就可以打断点
xdebug.remote_enable = 1
xdebug.idekey = phpstorm
xdebug.remote_connect_back = 1
xdebug.remote_port = 9999
xdebug.remote_handler = dbgp
xdebug.remote_log=/var/log/php/xdebug.log