使用Eclipse PDT来调试Ajax的网页并发请求 [英] Using Eclipse PDT for debugging Ajax pages with concurrent requests

查看:168
本文介绍了使用Eclipse PDT来调试Ajax的网页并发请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一次,我问同样的问题,但现在我可以给一个测试案例吧。

Once I asked this same question but now I can give a test case for it.

该问题存在于调试在Eclipse PDT在页面发送多个请求给服务器的动态网页。考虑一个网页如下:

The problem resides in debugging in Eclipse PDT when the page sends multiple requests to the server's dynamic pages. Consider a web page as follow:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="link-to-jquery/jquery-1.7.2.min.js"></script>
<script>
$(document).ready(function() {
    var list = $("ol");
    for (var i=0; i<20; i++) {
        list.append($('<li><img src="/img.php?'+i+'" /></li>'));
    }
});
</script>
</head>

<body>
<ol>
</ol>
</body>

</html>

在上面的页面,jQuery是从缓存图片仅用于prevent浏览器。而在 img.php 读这样的:

In above page, JQuery is used only to prevent browser from caching the images. And the the img.php reads like this:

<?php
readfile('some_image.jpg');

当我尝试调试在Eclipse PDT的第一页,使用Zend调试,只有第一个 img.php 提出要求和其他人被解雇。样本输出显示附加的图像文件中。在presented情况下,不加载图像文件从调试项目的其余部分将不会prevent你。但是,一旦有因为这个问题是不加载JavaScript文件,项目的其余部分将无法正常工作,它必须如此。有谁知道我该怎么调试这样的页面?

When I try to debug the first page in the Eclipse PDT, using Zend Debugger, only the first img.php request is made and others are dismissed. A sample output is shown in the attached image file. In the presented case, not loading an image file won't prevent you from debugging the rest of project. But once there's a javascript file which isn't loaded because of this problem, the rest of project won't work as it has to. Does anyone know how can I debug such a page?

下面是我的说明:

  • 在PHP版本5.3.14
  • 在Zend调试V5.3
  • 的Eclipse PHP开发,版本:3.0.2
  • 的Apache / 2.2.22(Ubuntu的)

推荐答案

我发现这个问题是特定于Zend调试和Xdebug工程进展顺利。

I found that this problem is specific to Zend Debugger and XDebug works smoothly.

+1 XDebug的,-1 Zend调试

+1 for XDebug, -1 for Zend Debugger

这篇关于使用Eclipse PDT来调试Ajax的网页并发请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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