Symfony 和 xDebug 视图变量
对于某些人来说,这可能是一个快速答案,但我一直无法找到答案。
我正在将 xDebug 与 Symfony 应用程序一起使用,并且我发现 xDebug 无法将我的视图变量报告到 Eclipse 中的变量视图非常烦人。
我认为解决方案是将这些变量在组件(/action)范围内声明为公共变量,但是当我在那里声明我的视图变量时,它们在我的 Symfony 视图/部分中不再可用。
有没有人遇到同样的烦恼并找到解决方案?
编辑
我做了一些进一步的调查,发现sfComponent实现了__set(),因此我的变量实际上并不是对象的(直接)属性。这很有意义,但我仍然希望能够调试我的视图变量。如果有人有解决方案,我愿意接受建议。
This will probably be a quick answer for somebody, but I haven't been able to find the answer.
I'm using xDebug with a Symfony application, and I find it quite annoying that xDebug cannot report my view variables to my variable view in eclipse.
I figured the solution would be to declare these variables as public in the scope of the component (/action), however when I declare my view variables there, they are no longer available in my Symfony view/partial.
Has anybody run into this same annoyance and found a solution?
Edit
I did some further investigation and found that sfComponent implements a __set() so that my variables are not actually (direct) properties of the object. This makes a lot of sense, but I would still like to be able to debug my view variables. If anybody has a solution, I'm open to suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
视图变量存储在参数持有者中,因此仍然可以从视图对象访问它们。您所要做的就是检查参数持有者变量。
view variables are stored in a parameter holder, so they are still accessible from the view object. All you have to do is inspect the parameter holder variable.