Debugging Ajax/XmlHttpRequests using Xdebug on Sublime

32 Views Asked by At

What settings should I use for debugging PHP files called by XmlHttpRequests? My client is coded in Elm, so it is a single page application (SPA) invoking a series of PHP files. When I am debugging, I would like to see the cursor at the first line of the PHP file in Sublime whenever that file is invoked, and then be able to step through it, or let it run onto a breakpoint, or the end.

I have Xdebug installed and the Xdebug Client Plug-in installed in Sublime. Currently, my Sublime project file looks like this:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "."
        }
    ],
    "settings": {
        "xdebug": {
            "url": "http://localhost/GDAS/GDASExhibitors"
        }
    }

}

The xdebug section in php.ini looks like this:

[xdebug]
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so
xdebug.mode=debug
xdebug.client_port=9000
xdebug.start_with_request=yes

Within Sublime, I am using the default Xdebug settings. I can get it to break at breakpoints in certain files, but not others. I think this may be something to do with multiple "sessions".

0

There are 0 best solutions below