Debug a Server Script triggered by Mobile App HTTP Post

I'm developing a mobile app that is going to do HTTP post to a PHP server script.  But have no idea how I should get it set up.

I have the app on an emulator and also on a device.

The script will run on the web.

I tried to create a debug configuration for a PHP HTTP request, but that options is x'ed out in my debug configurations dialog.

None of the other options make sense.

So far, I'm finding that PHPStorm is great for basic javascript or server code debugging, but it doesn't seem to know anything about real web apps where there are clients and servers cooperating.

Have you ever tried to debug javascript and PHP at the same time?  Good luck.

This seems to be in the same category.

2 comments
Comment actions Permalink

Hi Mitch,

You only need to use "PHP HTTP request" Run/Debug configuration if you want to execute/debug specific request (once .. or multiple times) where you hardcode all request parameters/headers yourself in advance: http://www.jetbrains.com/phpstorm/webhelp/debugging-a-php-http-request.html

I personally would not use it -- I prefer easier to use "live" environment, where such request is sent from the app itself and then I just debug it "as usual" (as described in "Zero-Configuration debugging": http://confluence.jetbrains.com/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0 -- which means usage of that "red phone handle" button in PhpStorm -- if xdebug and path mappings are configured properly, then this works just fine and allows to debug any web request -- you can always trigger debug session manually by calling xdebug_break() function in your code ).

I tried to create a debug configuration for a PHP HTTP request, but that options is x'ed out in my debug configurations dialog.

If you provide some hints about how you configured it (a screenshot maybe), then somebody may have some comments/advices on what possibly is done wrong there (missing required field; invalid value entered etc). Otherwise -- no clue as it worked just fine in my case when I was testing it.

0
Comment actions Permalink

Thanks for the help.

PHPStorm seems great... lots of bugs... confusing wording of menus... very poor documentation... but lots of potential!

Mitch

0

Please sign in to leave a comment.