9 Replies Last post: Feb 13, 2014 5:45 PM by Pawel Duda  
Pawel Duda Newbie 8 posts since
Mar 6, 2013
Currently Being Moderated

Feb 12, 2014 5:32 PM

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

Andriy Bazanov Master 4,193 posts since
May 28, 2010
Currently Being Moderated
Feb 12, 2014 5:35 PM in response to: Pawel Duda
Re: PHP Storm 7.1.2 - configuring xdebug - why need PHP interpreter?

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.

Andriy Bazanov Master 4,193 posts since
May 28, 2010
Currently Being Moderated
Feb 12, 2014 8:30 PM in response to: Pawel Duda
Re: PHP Storm 7.1.2 - configuring xdebug - why need PHP interpreter?
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.

Andriy Bazanov Master 4,193 posts since
May 28, 2010
Currently Being Moderated
Feb 12, 2014 9:06 PM in response to: Pawel Duda
Re: PHP Storm 7.1.2 - configuring xdebug - why need PHP interpreter?

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:

Andriy Bazanov Master 4,193 posts since
May 28, 2010
Currently Being Moderated
Feb 13, 2014 3:29 PM in response to: Pawel Duda
Re: PHP Storm 7.1.2 - configuring xdebug - why need PHP interpreter?

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.

More Like This

  • Retrieving data ...