Phpstorm, xdebug and vagrant still waiting for incoming connection

后端 未结 3 909
小鲜肉
小鲜肉 2020-12-18 23:39

This is annoying me, mainly because it was working fine then all of a sudden breakpoints stopped breaking and when i checked debugger it was just waiting for incoming connec

3条回答
  •  甜味超标
    2020-12-19 00:13

    You say you have a server setup pointing to port 80? That could be the problem.

    I have a vagrant server setup in PHPstorm which has a host of dev.website.com which points at the correct IP in windows host file, the port is 80 and the folders are mapped correctly.

    Do you use PHP Remote Debug?

    If it's the server setup from the screenshot, change the port there to 9020 or whatever you desire to use.


    My First steps of checking why xDebug isn't working:

    Set Break at first Line in the PHPStorm preferences

    preferences->languages&frameworks->PHP->debug ( search break at first )

    Enable the break at first Line feature

    Still not working?

    What does your phpinfo say? Is xDebug enabled and do all the settings match?

    phpinfo()
    

    If not try this https://xdebug.org/wizard.php and check out this Tutorial

    If so try

    Is there maybe a firewall blocking your port?

    No? ok ->

    vagrant ssh 
    netstat -an | grep 9000
    

    Check if the port is listening and is not blocked by anything.

    I would recommend using port 9000, had issues with others.

    I recently had an issue with hhvm blocking the port. I purged it from the system.

    If everything looks fine, try to use phpstorms remote debug feature and map explicitly your index.php file of your project/s.


    Also maybe try not to use numeric values as your idekey

    XDEBUG_SESSION_START=18359

    Most people use something like this:

    XDEBUG_SESSION_START=PHPSTORM

    you can add an idekey to your xdebug.so would look like this

    xdebug.idekey=PHPSTORM
    

    Small list with xdebug parameters: https://xdebug.org/docs/basic

    My current projects phpstorm config looks like this:


    This is a plugin for setting the session cookie in the browser https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc

提交回复
热议问题