Debug ajax php with netbeans xdebug

I have a jquery that calls an ajax call to another php file and cannot work, how to get netbeans and xdebug to stop at a breakpoint in this file. EG:

index.php

function ajaxfunc(){ ... } 

other.php

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

Netbeans stops in index.php code but not in other.php

+6
source share
2 answers

Add? XDEBUG_SESSION_START = netbeans-xdebug to your ajax url.

which will enable debugging for your ajax call. make sure that the project you opened contains the other.php file.

+10
source

Really just change any url to include? XDEBUG_SESSION_START = netbeans-xdebug seems to start xdebug [linux / nginx / fpm / netbeans]

0
source

Source: https://habr.com/ru/post/947737/


All Articles