更新 - 努力让WAMP phpDeveloper/Xdebug继续前进.我仍然想要NetBeans - 我只是想比较,看看我是否得到了一些见解.
我正在使用带有LAMP和Xdebug的NetBeans 6.9来处理PHP代码.Variables显示效果很好,但最近效果不佳.例如,下面的代码应该在代码下面的变量窗格中可见,并且应该公开它的值.但它没有显示,也没有显示它的价值,并且对代码的模仿并没有帮助.(该对象正在显示,它会继续显示,但不在那里,如果是,那就没有意义.) $authorized$this$authorized
这种行为是一致的.也许这是代码复杂性的一个功能?还是猖獗的对象使用?它似乎是在我拿起CodeIgniter时开始的.
当然,当我最需要它们时,变量是隐藏的...或者对于穷人来说似乎是这样.我错过了什么?
NetBeans调试器http://themanthursday.com/wiki/Debugger_Display.png
下面有一个更好的例子.当我踩过这段代码时,Variables只显示Superglobals和$ this,就像在图片中一样.我看不到任何价值,甚至只是字符串.
(唠叨想:我打赌$ CI SuperObject与所有这些有关...)
class Product_documents {
function getProductImage_all($id)
//Return an array of all documents for this product
{
$imgPath = $this->_getProductImage_folder($id);
$arrayPossibleFilenames = $this->_getProductImage_possible_files($id);
foreach ($arrayPossibleFilenames as $imgFile) {
$imgPathFull = $imgPath.$imgFile;
$file_exists = get_file_info($imgPathFull);
if ($file_exists)
{
$arrayFilesPresent[] = $imgPathFull;
}
}
return $arrayFilesPresent;
}
}
Run Code Online (Sandbox Code Playgroud)
小智 6
来到这个网站,它有一个非常好的链接到Xdebug页面,通过编译"更新的"版本来完成升级Xdebug的过程:
http://icephoenix.us/php/xdebug-doesnt-show-local-variables-in-komodo-netbeans-or-eclipse-pdt/
对象/类内的变量再次出现!是啊!
没有手表,没有'这可能让Xdebug吓坏了'的消息 - 只是好的变量,现在完全暴露了我的解决方案的失败......(哈哈).
大卫
| 归档时间: |
|
| 查看次数: |
5587 次 |
| 最近记录: |