phpajaxeclipsenetbeansphpstorm

Debug a single PHP file with $_GET parameters in NetBeans/Eclipse/PHPstorm (AJAX API)


This should be straightforward, but Google is not helpful today.

I have a PHP Ajax API, with a series of separate files, each of which accepts its parameters through $_GET.

How do I feed those parameters when I debug a file?

(Incidentally, XDebug is working fine, it launches a browser when I tell NetBeans to debug the file; I just can't see how to pass parameters to the URL Which is launched)


[Update] I will also accept an answer for Eclipse and even for PHP Storm, which I will buy if I can't find a free solution.


[Update++] To clarify, I want to be able to stop on breakpoints in the IDE. Some answers here seem to have somehow missed that point.

Solution

Eight years later: I stopped using NetBeans shortly after posting this question. I am now very happy with VS Code. The easiest way to do what I ask would be to use Postman. There is also a plugin in with similar functionality for VS Code (Google for it if interested)


Solution

  • If you are using $_GET parameters then you can simply use a browser with an Xdebug helper plugin eg https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en

    Your GET parameters can be coded into a request directly into the address bar and then when you visit teh page via your browser, you can debug the script as it runs.

    Running Xdebug this way - from the browser - is a much simpler and more intuitive way of working.

    PHPStorm is the best IDE that I'm aware of for getting Xdebug working