I am trying to run a PHP script through AJAX and when I run the AJAX code (auto runs when page loads). I am using Xdebug and VSCode (which is listening for xdebug) to debug my code at my break points. But when I load the page it ignores my breakpoints.
I should also mention that the PHP script is including another PHP script with a class I need, and its that class that I have placed the break points at, I don't know if that is the problem.
I have tried putting the break points into different areas, and I have put xdebug.remote_autostart = on
into my php.ini and it still doesn't work.
let type = $('#categories').val();
$.ajax({
url: `php/admin_categories.php?subcat=true&category=${type}`,
type: 'get',
success: function(pre_result) {
console.log(pre_result);
let result = $.parseJSON(pre_result);
for (let i = 0; i < result.length; i++) {
$('#sub_cat').append(
`<option value="${result[i].abbr}">${result[i].name}</option>`
);
}
}
});