使用netbeans xdebug调试ajax php

Dat*_*ion 6 ajax netbeans xdebug

我有jquery对另一个php文件进行ajax调用,并且无法研究如何让netbeans和xdebug停在此文件的断点处.例如:

的index.php

function ajaxfunc(){
    ...
}
Run Code Online (Sandbox Code Playgroud)

other.php

<?php
    echo Whatever::doit();
    class Whatever(){
            public function doit(){
                $stopme="now";
            }
    }
?>
Run Code Online (Sandbox Code Playgroud)

Netbeans停在index.php中的代码但不在other.php中停止

tro*_*man 10

将?XDEBUG_SESSION_START = netbeans-xdebug添加到您的ajax网址.

这将打开你的ajax调用的调试.确保您打开的项目中包含other.php文件.