您的位置:首页 > 数据库 > Oracle

Oracle 11g物理Active Data Guard实时查询(Real-time query)特性

2013-04-14 11:48 337 查看
<iframe align="top" marginwidth="0" marginheight="0" src="http://www.zealware.com/46860.html" frameborder="0" width="468" scrolling="no" height="60"></iframe>
作者:Haohappy

MSN: haohappy at msn.com

Blog: http://blog.csdn.net/haohappy2004

<chsdate year="2006" month="7" day="4" islunardate="False" isrocdate="False" w:st="on"><strong style=""><span lang="EN-US" style="font-size: 7.5pt; color: rgb(255, 102, 0); font-family: Verdana;">2006-07-04</span></strong></chsdate>

Go on..现在我们来从最简单的程序调试开始一步步介绍Xdebug。

调试:
我们先写一个可以导致执行出错的程序,例如尝试包含一个不存在的文件。

testXdebug.php

<?php <o:p>
require_once(‘abc.php’);

?>


然后通过浏览器访问,我们惊奇地发现,出错信息变成了彩色的了:



不过除了样式改变,和我们平时打印的出错信息内容没什么不同,意义不大。好,我们继续改写程序:

testXdebug2.php

<?php <o:p>
testXdebug();

function testXdebug() {

require_once('abc.php');

}

?>

输出信息:



发现了什么? Xdebug跟踪代码的执行,找到了出错的函数testXdebug()。

我们把代码再写得复杂一些: 

testXdebug3.php

<?php <o:p>
testXdebug();

function testXdebug() {

requireFile();

}

function requireFile() {

require_once('abc.php');

}

?>

输出信息:



呵呵,也就是说Xdebug具有类似于Java的Exception的“跟踪回溯”的功能,可以根据程序的执行一步步跟踪到出错的具体位置,哪怕程序中的调用很复杂,我们也可以通过这个功能来理清代码关系,迅速定位,快速排错。

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=893060
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: