Waiting for incoming connection with ide key phpstorm как исправить

I’ve searched a lot for this problem when debugging php using PhpStorm with xdebug, I found 3 or 4 links discussing this problem, but none of them are useful.My Xdebug’s version is 2.2.3, and PhpStorm’version is 6.03. I could debug every line step by step except this one

$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);

PhpStorm shows this error:Waiting for incoming connection with ide key “14841”.
Here are my xdebug configuration:

 zend_extension="/usr/lib/xdebug.so"
 xdebug.remote_autostart=1
 xdebug.show_local_vars=1
 xdebug.dump.GET=*
 xdebug.dump.POST=*
 xdebug.dump.SERVER=*
 xdebug.auto_trace=On
; default trace output directory /tmp
 xdebug.collect_vars = On
 xdebug.trace_output_dir=/tmp
 xdebug.collect_params=4
 xdebug.collect_return=On

 xdebug.profiler_enable=Off
; default trace output directory /tmp
 ;xdebug.profiler_output_dir=/tmp
 ;xdebug.profiler_enable_trigger=On
;test.php?XDEBUG_PROFILE
 xdebug.remote_enable=On
 xdebug.remote_host="localhost"
 xdebug.remote_port=9001
 xdebug.remote_handler="dbgp"
 xdebug.remote_log = "/tmp"
 xdebug.remote_connect_back=1
 xdebug.idekey=PHPStorm  

I add these lines ” xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm “, also resisted ide ,it is still the same
i assure that the three parameters are correct.

asked Jul 18, 2013 at 5:24

vidy videni's user avatar

For me, the debugger never connected and I saw the Waiting for incoming connection with ide key message because I set set my Server configuration to port 9000. This should be set to port 80 (or whatever other port the webserver is listening to! This was confusing to me because it’s right next to the Debugger dropdown and I figured it was to set the Xdebug port.

You do NOT want to set this value to the debug port

The Debug port is configured in Settings->Languagues & Frameworks->PHP->Debug. Set this to 9000 or whatever you configured php.ini to be.

Set Debug port to 9000 in PHP Debug settings

Just a note, I was using IntelliJ IDEA, but it’s all the jetbrains platform.

answered Feb 25, 2016 at 17:27

Dave Patrick's user avatar

You wrote:

PhpStorm shows this error:Waiting for incoming connection with ide key “14841”.

But you use:

 xdebug.idekey=PHPStorm

Those ide keys need to match. PHP Storm is a bit funny about it.

But then you also said:

I could debug every line step by step except this one

$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);

How are they different? Is there different behaviour, or just doesn’t it stop?

answered Jul 23, 2013 at 9:19

Derick's user avatar

DerickDerick

34.5k5 gold badges75 silver badges96 bronze badges

2

I had a similar issue. In my case it was caused by misunderstanding PHPStorm/IntelliJ PHP debugging modes. There are two modes:

  1. “Local” PHP debugging
  2. “Remote” PHP debugging

When you use the “local” debugging, IDE key is autogenerated

This means, that primitive bookmarklets, created at http://www.jetbrains.com/phpstorm/marklets/ will not work in local mode: the bookmarklet contains a hardcoded IDE key, but PHPStorm will generate a random one!

The solution is to enable “Remote” PHP debugging mode (it is currently called “PHP Remote Debug”) in “Run/Debug Configurations” and set the IDE key in the right pane of the create launch configuration.

“DBGp proxy” in global settings is probably not what you want; create a “Remote” debug config and set the IDE key there.

answered Dec 11, 2017 at 7:19

user1643723's user avatar

user1643723user1643723

4,0911 gold badge24 silver badges48 bronze badges

I was having a similar issue in a local installation.
I fixed it by unselecting the setting: Use Path Mappings

Found under the Settings > Languages & Frameworks > PHP > Servers

answered Sep 22, 2015 at 17:05

Sakis's user avatar

SakisSakis

7916 silver badges12 bronze badges

1

Здравствуйте! Уже всю голову сломал и весь интернет перерыл, но не нашел.
Настроил xdebug. (php7, mysql, apache2, laravel 5.3)
php -v в консоли виводитьт с “… with Xdebug v2.4.1”.
Подключаю в phpstorm и как только жму “дебаг” сообщение все время:
Waiting for incoming connection with ide key ‘11777’
php.ini:

zend_extension = /usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp"
xdebug.idekey=PHPSTORM

Окна настроек в шторме:
d7965e0f434f4285bcc06aa832687bc3.png56f68cc54bc44c2a96a9ffe4e5f1de76.png866bc1dc648a4c3ba8f576b08b41751e.png22685f70ea5a4a4aa339ebc87e8fa562.pnga6d24a11b30e4d7382a4ab81ec67a05a.png9cabd1e552a24ec2b2e0f50ca5757d4e.png
Иногда в ленте ивенов в шторме сообщение:
3:39 Cannot accept external Xdebug connection: Cannot evaluate expression ‘isset($_SERVER[‘PHP_IDE_CONFIG’])’

Что не так делаю? Спасибо!

Answer by Camilla Snow

PhpStorm shows this error:Waiting for incoming connection with ide key “14841”.
Here are my xdebug configuration:,For me, the debugger never connected and I saw the Waiting for incoming connection with ide key message because I set set my Server configuration to port 9000. This should be set to port 80 (or whatever other port the webserver is listening to! This was confusing to me because it’s right next to the Debugger dropdown and I figured it was to set the Xdebug port.,PhpStorm shows this error:Waiting for incoming connection with ide key “14841”.,I’ve searched a lot for this problem when debugging php using PhpStorm with xdebug, I found 3 or 4 links discussing this problem, but none of them are useful.My Xdebug’s version is 2.2.3, and PhpStorm’version is 6.03. I could debug every line step by step except this one

But you use:

 xdebug.idekey=PHPStorm

I could debug every line step by step except this one

$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);

Answer by Royal O’Connor

Today, we are using phpstorm to configure Xdebug + chrmoe breakpoint debugging. For a reference to configuration methods: http://www.it165.net/os/html/…After configuration, breakpoint debugging started, but it was found that the debugger panel was always output:,The screenshots are as follows:
Causes failure of subsequent breakpoint debugging.
My Xdebug configuration is as follows:,Information Security
,Maybe there is something wrong with chrome’s plug-in. You can refer to the plug-in used in the official document below. I can debug it properly with this plug-in.
https://confluence.jetbrains.com/display/PhpStorm/Configure+Xdebug+Helper+for+Chrome+to+be+used+with+PhpStorm

Today, we are using phpstorm to configure Xdebug + chrmoe breakpoint debugging. For a reference to configuration methods: http://www.it165.net/os/html/…
After configuration, breakpoint debugging started, but it was found that the debugger panel was always output:

Waiting for incoming connection with ide key 18479

The screenshots are as follows:

Causes failure of subsequent breakpoint debugging.
My Xdebug configuration is as follows:

Directive    Local Value    Master Value
xdebug.auto_trace    Off    Off
xdebug.cli_color    0    0
xdebug.collect_assignments    Off    Off
xdebug.collect_includes    On    On
xdebug.collect_params    0    0
xdebug.collect_return    Off    Off
xdebug.collect_vars    Off    Off
xdebug.coverage_enable    On    On
xdebug.default_enable    On    On
xdebug.dump.COOKIE    no value    no value
xdebug.dump.ENV    no value    no value
xdebug.dump.FILES    no value    no value
xdebug.dump.GET    no value    no value
xdebug.dump.POST    no value    no value
xdebug.dump.REQUEST    no value    no value
xdebug.dump.SERVER    no value    no value
xdebug.dump.SESSION    no value    no value
xdebug.dump_globals    On    On
xdebug.dump_once    On    On
xdebug.dump_undefined    Off    Off
xdebug.extended_info    On    On
xdebug.file_link_format    no value    no value
xdebug.force_display_errors    Off    Off
xdebug.force_error_reporting    0    0
xdebug.halt_level    0    0
xdebug.idekey    PhpStorm    PhpStorm
xdebug.max_nesting_level    256    256
xdebug.max_stack_frames    -1    -1
xdebug.overload_var_dump    On    On
xdebug.profiler_aggregate    Off    Off
xdebug.profiler_append    Off    Off
xdebug.profiler_enable    Off    Off
xdebug.profiler_enable_trigger    Off    Off
xdebug.profiler_enable_trigger_value    no value    no value
xdebug.profiler_output_dir    /var/tmp/    /var/tmp/
xdebug.profiler_output_name    cachegrind.out.%p    cachegrind.out.%p
xdebug.remote_autostart    On    On
xdebug.remote_connect_back    Off    Off
xdebug.remote_cookie_expire_time    3600    3600
xdebug.remote_enable    On    On
xdebug.remote_handler    dbgp    dbgp
xdebug.remote_host    localhost    localhost
xdebug.remote_log    no value    no value
xdebug.remote_mode    req    req
xdebug.remote_port    9000    9000
xdebug.scream    Off    Off
xdebug.show_exception_trace    Off    Off
xdebug.show_local_vars    Off    Off
xdebug.show_mem_delta    Off    Off
xdebug.trace_enable_trigger    Off    Off
xdebug.trace_enable_trigger_value    no value    no value
xdebug.trace_format    0    0
xdebug.trace_options    0    0
xdebug.trace_output_dir    /var/tmp/    /var/tmp/
xdebug.trace_output_name    trace.%c    trace.%c
xdebug.var_display_max_children    128    128
xdebug.var_display_max_data    512    512
xdebug.var_display_max_depth    3    3

Answer by Rebekah Jarvis

Because Xdebug needs either a cookie XDEBUG_SESSION or a query string in url XDEBUG_SESSION_START and the value is the value of your Waiting for incoming connection with ide key.,I am using xDebug. but i can not debug the entire project. I can debug start URL page breakpoints. But when i step over lines it shows the login page and when i submit login page i can not reach next break point. In variables window it shows ” Waiting for incoming connection with ide key ”. My configuration of php.ini for xdebug:,Note** this option does not delete the question immediately,Since others contribution also matters and security reasons.Your request will be Queued.We will review the question and remove.It may take some days.,If you add any files,it will delete all existing files related to this question-(questions only answer remains unchanged)

I am using xDebug. but i can not debug the entire project. I can debug start URL page breakpoints. But when i step over lines it shows the login page and when i submit login page i can not reach next break point. In variables window it shows ” Waiting for incoming connection with ide key ”. My configuration of php.ini for xdebug:

[XDebug]
    zend_extension="/usr/lib/php5/20121212+lfs/xdebug.so"
    xdebug.remote_enable=1
    xdebug.remote_port="9001"
    xdebug.profiler_enable=1
    xdebug.profiler_output_dir="home/tmp"

Answer by Jay Benton

after few days of war with my docker, xdebug, phpstorm i got this problem.,After i use “curl 127.0.0.1:6080” (cause this is my prot from docker-compose) there is nothing happend in debug section. I would be thankful for any advices.,My debug configuration:,
In my application date picker is not working when I select another country

After i use “curl 127.0.0.1:6080” (cause this is my prot from docker-compose) there is nothing happend in debug section. I would be thankful for any advices.

# nginx
nginx-service:
    image: nginx:stable-alpine
    container_name: nginx-container
    ports:
        - "6080:80"
    volumes:
        - ./app:/var/www/project
        - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
        - php74-service
        - mysql8-service
    networks:
        - nginx-php74-mysql8

Any my php Dockerfile:

FROM php:7.4-fpm

RUN apt-get update && apt-get install -y zlib1g-dev g++ git libicu-dev zip libzip-dev zip 
    && docker-php-ext-install intl opcache pdo pdo_mysql 
    && pecl install apcu 
    && docker-php-ext-enable apcu 
    && docker-php-ext-configure zip 
    && docker-php-ext-install zip

RUN pecl install xdebug && docker-php-ext-enable xdebug 
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.remote_port=9001" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.remote_connect_back=0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.discover_client_host=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.idekey=docker" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 
&& echo "xdebug.remote_host=192.168.0.1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

WORKDIR /var/www/project

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN curl -sS https://get.symfony.com/cli/installer | bash
RUN mv /root/.symfony/bin/symfony /usr/local/bin/symfony

Answer by Dakari Johnston

Hi ! I followed this guide three times but getting this message in Xdebub :
Waiting for incoming connection with ide key ‘PHPSTORM’,After waisting a few hours – I think it is also worth mentioning that you must also have xdebug.remote_connect_back set to 0 – otherwise it won’t initiate the connection from server php-fpm,I never got into Xdebug thing and a little bit started with that. Then fire nation attacked. I mean i started use docker and i was on zero again.
So thank you for this guide, complete and i hope foolproof (will see when i will do that), i love that :),Nice article but my love is for VSCode so I’ve written a guide for integrating Xdebug in VSCode for PHP debugging. You can read it here: cloudways.com/blog/php-debug-with-…

docker-compose up
Starting symfony-docker-xdebug-demo_php_1 ... done
Recreating symfony-docker-xdebug-demo_nginx_1 ... done
Attaching to symfony-docker-xdebug-demo_php_1, symfony-docker-xdebug-demo_nginx_1
php_1    | standard_init_linux.go:207: exec user process caused "no such file or directory"
nginx_1  | 2019/03/27 15:35:15 [emerg] 1#1: host not found in upstream "php" in /etc/nginx/conf.d/default.conf:10
nginx_1  | nginx: [emerg] host not found in upstream "php" in /etc/nginx/conf.d/default.conf:10
symfony-docker-xdebug-demo_php_1 exited with code 1
symfony-docker-xdebug-demo_nginx_1 exited with code 1

За последние 24 часа нас посетили 12056 программистов и 1230 роботов. Сейчас ищут 576 программистов …


  1. Konst3

    С нами с:
    28 май 2018
    Сообщения:
    5
    Симпатии:
    2

    Господа, я сегодня с семи утра конфигурирую отладку в PHPstorm
    (при помощи XDebug) и уже слегка утомился.
    И название “Zero-configuration Web Application Debugging with Xdebug and PhpStorm” звучит уже очень иронично.
    Я натыкаюсь на какую то стену, и не могу продвинуться дальше.
    Смотрите.
    я хочу отлаживаться на удаленном сервере (локальный адрес – 192.168.10.48, там установлены Ubuntu 16.04, PHP 7.0, WordPress)
    а я сижу за компом с десятой виндой и коннекчусь по SSH.
    Я прочитал описание
    https://confluence.jetbrains.com/di…pplication+Debugging+with+Xdebug+and+PhpStorm
    и вот такую статью:
    https://m.habr.com/post/209024/
    Потом я по этому описанию настроил – и всё выглядело логично, чёрт побери.
    Всякие вадидейшены в настройках remote server – проходят.
    Но отладка не идёт, появляется сообщение:
    “Waiting for incoming connections with ide key ‘PHPSTORM'”:
    [​IMG]

    Вот отрывок из PHPinfo:
    [​IMG]

    Вот основные настройки (3 картинки, я убрал их под спойлер):

    Раздел DBGproxy я не настраивал, потому что не понимаю что это такое и зачем оно нужно.

    Вот файл конфигурации /etc/php/7.0/apache2/conf.d/20-xdebug.ini:
    zend_extension=xdebug.so
    xdebug.default_enable=1
    xdebug.remote_enable=1
    xdebug.show_error_trace=1
    xdebug.remote_handler=”dbgp”
    xdebug.remote_host=192.168.10.53
    xdebug.idekey=”PHPSTORM”
    xdebug.remote_mode=req
    xdebug.remote_port=9000
    xdebug.remote_connect_back=1

    В результате при запуске дебага на файле (когда нажимаю “зеленого жука” и устанавлдливаю точки останова) я получаю в одном из окошек сообщение
    “Waiting for incoming connections with ide key ‘PHPSTORM'”
    При этом порт 9000 открыт, на линуксовом файерволе никаких запретов нет.
    И телнетом я коннекчусь нормально с линукса на виндовс.

    я читаю описание протокола отладки
    https://xdebug.org/docs-dbgp.php#just-in-time-debugging-and-debugger-proxies
    и пока не могу понять, в какую сторону копать дальше.

    Помогите советом, я уверен, что я сделал правильно 80% настройки и чегото не понимаю в оставшихся 20%.
    Спасибо заранее.


  2. Konst3

    С нами с:
    28 май 2018
    Сообщения:
    5
    Симпатии:
    2

    Спапсибо, парни, но я уже разобрался.
    Модераторы у вас… очень осторожные, наверное.
    Мне помог человек из JetBrains, Eugene Morozov.
    Его совет сотоял в том, что “На самом деле, почти все настройки находятся на стороне Xdebug, в PhpStorm вам нужно настроить только маппинги когда коннекшн уже пришёл.”
    Сейчас я значительно продвинулся, у меня есть построчная отладка, и я могу расставить точки останова на серверной стороне,
    а потом запустить код в браузере – и попасть в одну из этих точек останова.
    Могу привести свою конфигурацию файла /etc/php/7.0/apache2/conf.d/20-xdebug.ini:

    zend_extension=/usr/lib/php/20151012/xdebug.so
    xdebug.default_enable=1
    xdebug.remote_enable=1
    xdebug.show_error_trace=1
    xdebug.remote_handler=”dbgp”
    xdebug.remote_host=192.168.10.53
    xdebug.idekey=”PHPSTORM”
    xdebug.remote_mode=req
    xdebug.remote_port=9000
    xdebug.remote_connect_back=1
    xdebug.trace_format = 1
    xdebug.trace_output_dir = /var/www/xdebug/log
    xdebug.extended_info = 1
    xdebug.remote_autostart = 1
    xdebug.remote_log = /var/www/xdebug/log/access.log

    А еще – мне помогла статья
    https://habr.com/sandbox/20485/


  3. serii366

    С нами с:
    16 мар 2018
    Сообщения:
    4
    Симпатии:
    1

    Я так рад за вас.
    А вы не поможете и мне настроить, а то у меня тоже дым из ушей валит и не могу разобраться.
    На локальном хостинге работает, а вот с удаленкой проблемы.


  4. Konst3

    С нами с:
    28 май 2018
    Сообщения:
    5
    Симпатии:
    2

    Привет всем.
    я прошу прощения, с тех пор прошел почти год, как я этой темой не занимался. Думаю, что сейчас могу помочь только общими советами.
    0) обычно полезно сконфигурировать сервер для отладки с нуля. При этом как то думаешь головой, что и как ставить, и иногда проблема решается в процессе.
    1) Надо проверить, как просиходит авторизация на сервере, на котором Вы пытаетесь настроить отладку: некоторые хостинги поддерживают для внешних коннектов только авторизацию по ключам.
    2) для полноты картины – напишите, с кикими OS вы работаете на дектопе и на сервере (мне всегда приходится работатьс комбинацией винды на десктопе и убунты на сервере, что создает дополнительный слой несовместимости. К счастью, JetBrains-овские продукты прекрасно поддерживают и то, и другое)
    Если это чему то поможет – я могу попробовать разыскать образ виртуалки, на которой у меня был настроен дебаг. Тогда напишите отдельно. Веротяность найти – 50 на 50, как обычно :)
    — Добавлено —
    … в продолжение “советов постороннего”:

    нарисуйте (или представьте в деталях) схему сетевого взаимодействия при отладке:
    среда разработки должна обратиться к внешнему серверу, на котором запускается скрипт, а при этом от этого сервера XDebug инициирует соединение снаружи со средой разработки на десктопе.

    На десктоп-винде есть два врага разработчика: антивирусы и файерволы. И то, и другое будет молча и активно сопротивляться попыткам XDebug’а снаружи приконнектиться к воркстейшн.

    Вырубите, а лучше – снесите с рабочей машины и антивирус, и файервол.

1

In phpstrom variable getting “Waiting for incoming connection with ide key 18836” while trying to run debug magento2 using xdebug. Xdebug is installed correctly in my Ubuntu system,checked with php -v. I thought, issue with phpstrom xdebug configuration. how to configure xdebug(3.0.3) in phpstrom (2020.3.2)

  • magento2.4.1
  • phpstorm
  • xdebug

Improve this question

asked Mar 5, 2021 at 9:49

Shekhar Suman's user avatar

Shekhar SumanShekhar Suman

4927 silver badges21 bronze badges

Add a comment
 | 

1 Answer

Sorted by:

Reset to default

2

Please follow these steps: https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html#integrationWithProduct from the official documentation.

Also, as far as I know Xdebug’s default debugging port has changed from 9000 to 9003 in xdebug3, so please consider that as well.

Improve this answer

answered Mar 5, 2021 at 10:23

Diana's user avatar

DianaDiana

4,9971 gold badge10 silver badges26 bronze badges

Add a comment
 | 

Your Answer

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Post as a guest

Name

Email

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged

  • magento2.4.1
  • phpstorm
  • xdebug

or ask your own question.

Добавить комментарий