Using Eclipse PDT for debugging Ajax pages with concurrent requests

懵懂的女人 提交于 2019-12-01 08:29:08

问题


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

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>

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');

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?

Here are my specifications:

  • PHP Version 5.3.14
  • Zend Debugger v5.3
  • Eclipse for PHP Developers, Version: 3.0.2
  • Apache/2.2.22 (Ubuntu)


回答1:


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

+1 for XDebug, -1 for Zend Debugger



来源:https://stackoverflow.com/questions/11469297/using-eclipse-pdt-for-debugging-ajax-pages-with-concurrent-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!