[SOLVED] Problems setting up xDebug: PhpStorm never reaches breakpoint

Answered

I am trying to setup my phpStorm for debug a Wordpress plugin but I can't get it to work properly and this means if I set a breakpoint any where in any file as for example functions.php at theme and/or front-page.php is not stopping in there and I can't trace code properly. I don't know what I am missing here so I need some advice from community. Regarding my environment: I am running a vMware VM from whithin a Windows 10 host, the host only interface has 192.168.3.1 as IP address, the VM is running CentOS 6.7 with PHP 7.0.4 and xDebug 2.4.0. The IP address of that server is 192.168.3.120. This is the configuration at my /etc/php.ini regarding xDebug:

[Xdebug]
zend_extension_ts="xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host="192.168.3.1"
xdebug.remote_port="9001"
;xdebug.profiler_enable=0
;xdebug.profiler_output_dir="/tmp"
xdebug.idekey="XDEBUG_PHPSTORM"
;xdebug.force_display_errors=1
xdebug.remote_log="/var/log/xdebug.log"

The following images shown the configuration at IDE side:

I have both xDebug extensions at Chrome and Firefox and both uses XDEBUG_PHPSTORM key. This others shown how extensions are properly enabled on browsers:



I have read also a few posts as this one but can't get this to work, can any help me?

6 comments

Hi there,

1. You do not seem to know what DBGp Proxy is (otherwise it would be configured differently).. therefore you do not need to touch that part at all

2. I see you are using 9001 port for xdebug instead of standard 9000. That's perfectly fine (and actually needed if you are running php on your web server as php-fpm). But did you change xdebug port in PhpStorm settings as well (I'm ignoring the 1st screenshot as unrelated)?

3. I see that you are using zend_extension_ts to load xdebug extension. Well ... since ancient 5.3.0 it has to be just zend_extension

4. Is xdebug actually installed and configured? What php_info() output shows?

5. What xdebug log has to say about all of this?

In any case:

 

0

1) You're right we use that at office but I don't know really what is it or if I leave it blank as it comes by default.

2) Yes, I think I setup everything take a look to the following pics:

3) nvm about this I remove that line because the extension is loaded already in `/etc/php.d/15-xdebug.ini` file so that line hasn't sense in there

4) Yes it,s installed and configured

5) I don't have any logs.

Debug is working now, using the steps above and the only thing additional I did is setup a path mappings under Languages & Frameworks > PHP which I don't know if it's right, see the pic below:

0

@andriy I am having the same issue at office on Fedora 23. So, it's a remote xDebug server that I used before from Windows using phpStorm 10.0.3 and now 2016.1 and the same exact configuration as I am using on Linux and it works as should be and other developers use as well so xDebug is not the problem. The project is on a mounted path trhough CIFS and it's under /mnt/dev/public_html/alpha This are some screenshot of my configuration:

Deployment

PHP > Debug

DBGp Proxy in this case I tried with those values and without them and the result is the same.

PHP Servers

I have setup xDebug helper plugins in Firefox and Chrome latest and set the proper key but is not working, even setting up several breakpoints I can't hit any of them. I don't know what else to do in this configuration since as I said is exactly the same as in Windows and in Windows it works, in Linux it doesn't, can you provide me with some advice?

Note: I have tried several times Zero configuration and is not working either.

0

Well ... it could be:

1. Different IP maybe?

2. Local Firewall or your Router (it's xdebug who connects to IDE and not other way around)

3. If you activate "phone handle" icon on your IDE; login to your remote server and try to connect to PhpStorm using telnet -- does it work? If not -- check firewall/router/ips/port numbers. Try the same with your Windows machine -- are you able to connect from server?

4. Once you can establish connection you may look at other nuances (if they will appear, of course: path mapping etc)

0

@Andriy excellent that was the issue please mark this as SOLVED since I can't

0

Please sign in to leave a comment.