Question

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)

Sample output

Was it helpful?

Solution

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

+1 for XDebug, -1 for Zend Debugger

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top