1

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

Community
  • 1
  • 1
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
  • 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 Aug 06 '16 at 17:01
  • @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 Aug 06 '16 at 17:02
  • 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 Aug 06 '16 at 17:05
  • @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 Aug 06 '16 at 17:07
  • 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 Aug 06 '16 at 17:11
  • @LazyOne already tried that, I have two different VM: one running CentOS 7 with PHP 5.6.24 and Xdebug 2.4.1 and a second one running CentOS 6.8 with PHP 7.0.4 and Xdebug 2.4.0 in none of them debugging works, would you like to try some remote assistance? – ReynierPM Aug 06 '16 at 17:13
  • Well .. I can have a look using TeamViewer .. but without xdebug logs it most likely would not be productive. Send me TV login details (make a chat or something) – LazyOne Aug 06 '16 at 19:19
  • @LazyOne let me know when you've a time and we can do a TeamViewer – ReynierPM Aug 06 '16 at 23:41
  • What says the phpstorm debug validation tool? (Run -> Web Server Debug Validation) – user3528269 Aug 07 '16 at 00:04
  • @user3528269 it says "Please, configure remote path mapping for the validation directory" but .. what else I should configure? – ReynierPM Aug 07 '16 at 00:10
  • Ah you're running inside a vm. Did you setup the 'PHP Remote Debug' Configuration? And if yes, how does it look like? And you want to debug from outside of the VM I guess? – user3528269 Aug 07 '16 at 00:18
  • @user3528269, yes I am running inside a VM, and yes I've that setup take a look to the edit on the OP – ReynierPM Aug 07 '16 at 00:23
  • @ReynierPM In that VM that does not work -- what Linux-wide "protection" tool is used? SELinux? If so -- see if `setsebool httpd_can_network_connect=1, nttpd restart` will help (took it from https://intellij-support.jetbrains.com/hc/en-us/community/posts/206357399-Remote-debug-in-phpstorm-with-xdebug) – LazyOne Aug 07 '16 at 22:40

3 Answers3

1

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.

Ricky Lee
  • 1,039
  • 6
  • 6
0

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

mrtuvn
  • 103
  • 1
  • 5
0

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