在php中,有没有办法跟踪变量? [英] In php , is there a way to trace a variable?

查看:102
本文介绍了在php中,有没有办法跟踪变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大PHP脚本中的这个变量,我想追溯到哪里/何时和什么价值实例化。有没有一个函数/ api或调试技术来做到这一点?

解决方案

如果你使用PHPStorm,你可以设置断点和检查变量的值。



http://blog.jetbrains.com/phpstorm/2013/12/just-in-time-debugging-and-php- exception-breakpoints-with-phpstorm-and-xdebug /



您还需要安装xdebug。


I have this variable in a big php script that I want to trace back to where/when and what value it was instantiated. Is there a function/api or debugging techniques to do this?

解决方案

If you're using PHPStorm you can set breakpoints and inspect the values of variables.

http://blog.jetbrains.com/phpstorm/2013/12/just-in-time-debugging-and-php-exception-breakpoints-with-phpstorm-and-xdebug/

You'll need xdebug installed as well.

这篇关于在php中,有没有办法跟踪变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆