1
votes

I have installed PhpStorm 2016.2.1 (EAP) and everything should be working fine but sadly debugging is not working for me. I have tried zero-configuration from here without success :(

Useful information:

  • I have a VM running CentOS 7 where I have the LAMP environment.
  • The /var/www/html/plataforma56.local is the path on the server where the project is
  • The remote path is mapped through SFTP to my host (using SFTP Net)
  • The project under PhpStorm is type of: "Source files are in a local directory, no Web server is yet configured".
  • PHP version is 5.6.24
  • Xdebug version is 2.4.1
  • Xdebug is enabled (see pic below)

enter image description here

  • I have check Xdebug using the HTML generated by phpinfo() and the Xdebug wizard page and everything is fine as per the output:

    Summary
    
    Xdebug installed: 2.4.1
    Server API: Apache 2.0 Handler
    Windows: no
    Zend Server: no
    PHP Version: 5.6.24
    Zend API nr: 220131226
    PHP API nr: 20131226
    Debug Build: no
    Thread Safe Build: no
    Configuration File Path: /etc
    Configuration File: /etc/php.ini
    Extensions directory: /usr/lib64/php/modules
    
  • I am running Windows 10 x64

  • My AV is ESET Smart Security (and yes I have disable the Firewall just for see if this is the root cause but without success)
  • IP/Port in Xdebug configuration is fine I've checked several times (even here under Communication Setup is a very useful animation explaining what happen so we can understand properly)
  • There is not application running on Windows using port 9005
  • phpStorm is installed in a host with IP: 192.168.3.1
  • IDE is configured

enter image description here

enter image description here

  • Path mapping is configured

enter image description here

  • SFTP connection is just working

enter image description here

  • Xdebug is enabled in the browser (Chrome/Firefox both running latest version) using Xdebug Helper extension ...
  • In Cookies ...

enter image description here

  • In Session Storage (set manually by me just in case)

enter image description here

  • In Local Storage (set manually by me just in case)

enter image description here

  • Finally the little icon green said: Extension is enabled

enter image description here

  • Breakpoints are set and multiple times and I have also added a programmatic break point: xdebug_break()

enter image description here

  • I have check also if port if open in the host and listening and here is the result:

    ==================================================
    Process Name      : PhpStorm64.exe
    Process ID        : 7496
    Protocol          : TCP
    Local Port        : 9005
    Local Port Name   : 
    Local Address     : 0.0.0.0
    Remote Port       : 
    Remote Port Name  : 
    Remote Address    : 0.0.0.0
    Remote Host Name  : 
    State             : Listening
    Process Path      : C:\Program Files (x86)\JetBrains\PhpStorm 2016.2.1\bin\PhpStorm64.exe
    Product Name      : PhpStor
    File Description  : PhpStor
    File Version      : 2016.2.1.PS-162.1447.
    Company           : JetBrains s.r.o.
    Process Created On: 8/6/2016 12:53:41 PM
    User Name         : REYNIERDESKTOP\ReynierPM
    Process Services  : 
    Process Attributes: A
    Added On          : 8/6/2016 1:54:39 PM
    Module Filename   : 
    Remote IP Country : 
    ==================================================
    

Finally, this is the configuration block at /etc/php.ini:

[Xdebug]
xdebug.remote_enable    = true (I have play with true|1 here)
xdebug.remote_host      = 192.168.3.1
xdebug.remote_port      = 9005
xdebug.idekey           = XDEBUG_PHPSTORM
xdebug.remote_handler   = dbgp
xdebug.profiler_enable  = 0
xdebug.remote_autostart = 1
xdebug.remote_log       = "/tmp/xdebug.log"

Having all this information I should ask:

  • I am missing something here?
  • Why this is not working?
  • Since this is a CodeIgniter 3 project it would be possible to debug this application? (dummy question but maybe is not possible for some reason)

The only thing I am missing here is Xdebug logs but I am not seeing any file under /tmp/xdebug.log on the server (maybe is not setup properly on my configuration, you tell me)

I am open to any solution because I am run out of ideas at this point and have spent hours trying to get this working (is the best when you're running into application issues that you need to fix)

Note: I know this is a common and recurrent issue and have been asked several times but before close it, or mark as duplicate or down vote please try to help.

I should add here that I've read this list of posts:

And I could keep adding more and more since I have spent hours trying to find why isn't working.

EDIT: Run/Debug configuration screen

enter image description here

3
You need to provide xdebug logs. There is no way (for me at least) to tell if xdebug is even listening there without such logs. The log should tell to what IP/port it tries to connect and what file it wants to debug. You may also try older xdebug version (2.4.0 or even 2.3.x) -- maybe it's something wrong with this xdebug build etc. - LazyOne
@LazyOne can you help me to get such logs? I am not seeing them anywhere, that's what I said here "The only thing I am missing here is Xdebug logs but I am not seeing any file under /tmp/xdebug.log on the server (maybe is not setup properly on my configuration, you tell me)" - ReynierPM
Limited access rights? Try different folder where Apache/PHP can write for sure. Try with remote_autostart = 1 so that xdebug would try to edit every single script. I have no idea why xdebug would not be able to write to the log while it still can debug. I've seen only one question here where person said: "ok, it's working now .. but still no logs" .. but in ALL other cases that I remember logs were generated... - LazyOne
@LazyOne isn't working, I have change the path to where Apache writes logs and no /var/log/httpd/xdebug.log file is being created, also I have added the line you told me - ReynierPM
Not a Linux person -- do not know what it could be (why logs are not generated). My only suggestion under such circumstances -- try different xdebug version/build. - LazyOne

3 Answers

1
votes

I had the same problem running on vagrant+php7.0.10+xdebug2.4.1. I set the xdebug.remote_autostart=1 option in php.ini and that solved the problem for me.

0
votes

I have installed successfull with php7.0.9 xdebug 2.4.0 custom port . I used FPM-FastCgi too. phpv5.6 still can't make it work with phpstorm and xdebug

0
votes

Same problem. I work on vagrant VM machine and php56 + xdebug 2.4.1. Remote debug does not work!