PHP Storm 7.1.2 - configuring xdebug - why need PHP interpreter?

Hi,
I'm trying to configure xdebug in PhpStorm. I initially added a new verision of PHP on my Mac, but then I tghouth why do I even need an interpreter locally, because it might be a completely different version than on the server.
Any thoughts on that?

I see there is a dead discussion here: http://devnet.jetbrains.com/thread/438162

Pawel

9 comments

Hi there,

PHP Interpreter is required if you need to run anything locally (be it PHPUnit tests/PHP Script in CLI mode/Composer/CodeSniffer or whatever). If nothing will be run locally then it is not required, obviously.

0

Then I'm wondering what would trigger this error
in PhpStorm:

http://imgur.com/NNDnd2x

0
Then I'm wondering what would trigger this error in PhpStorm:

You are trying to run PHP Script in CLI mode ... on local computer -- error message is correct.

0

How to run it if the only available data:

  • xdebug port
  • hostename of the server



I have server configured in PHP -> Servers
I have the checkbox selected next to "Use path settings (select if the server is remote...)"
Have a path to my project on a mapped resource under "File/Directory" and "Absolute path on the server".

WHen I run "Validate remote environment" button I get: "Please, configure path mapping for the validation directory" - and again don't know what that refers to.

Thanks for having a look at it!
Pawel

0

To debug (launch from IDE and debug, to be precise) script on remote server you will need to create Run/Debug Configuration of different type: either "PHP Remote Debug" or "PHP Web Application".
http://www.jetbrains.com/phpstorm/webhelp/debugging-php-applications.html

The easiest way to debug (which I always recommend) is to use Zero-Configuration approach: http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

Other useful links:

0

Thanks Andriy. That was very informative! I have to have a look at all the resources and hope it will work. So far, I've I appreciate mostly those two options that you have pointed me to. That explains a lot.

0

No I'm at the stage where PhpStorm tells me "Waiting for incoming connection with ide key '12490'".
I've tried telneting to my port from dev server to my port 9000 on which I'm listening for data sent from xdebug and I get connected.

I'm using 'PHP Web Application' configuration.

Any ideas on that?

0

1. Check xdebug configuration.

2. See what xdebug log says about it (maybe it's connecting to wrong IP or port)

3. Possibly you have not setup mappings correctly (Settings | PHP | Servers) -- try deleting it and allow IDE to help (once it will receive incoming connection) .. or file that triggers debug is outside of the project.

4. Unreachable breakpoint (dead code; set at line where xdebug cannot break (there are some cases dues to the way how PHP generates bytecode) etc). Try placing xdebug_break(); in such case.

0

Got it working!
  I followed your advice - removed mapping, sent a ticket to check what's in xdebug logs and then it turned out on some environment xdebug is not available, on some it is.
  I solved my problem immediately.
Thanks Andriy

0

Please sign in to leave a comment.