Search code examples
phpajaxeclipsenetbeansphpstorm

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


This should be straightfoward, but Googe is not helpful today.

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

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

(btw, 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++] Please, realize that I want to be able to stop on breakpoints in the IDE. Some answers here seem to have somehow missed that point.


8 years later: I quit NetBeans shortly after posting this question. Went to PHPstorm, couldn't afford it am now very happy with VS Cod. 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