View Issue Details

IDProjectCategoryView StatusLast Update
0001376XdebugStep Debuggingpublic2016-12-06 21:55
Reporteraheissenberger Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2.5.0RC1 
Summary0001376: xdebug is always triggering a break on page load
Description

independend of setting xdebug.remote_autostart to on/off any page load will trigger a break on page load in OSX MacGDBp and Chrome Xdebug Plugin. Both with Settings "Break on first Line off"

Steps To Reproduce

== ah_test.php ==
<?php
echo "test";
== ah_test.php ==
http://www.test.dev/ah_test.php

Log opened at 2016-12-06 16:49:30
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 192.168.99.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/ah_test.php" language="PHP" xdebug:language_version="5.6.28" protocol_version="1.0" appid="5" idekey="www-data"><engine version="2.5.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>

<- run -i 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="1" status="stopping" reason="ok"></response>

<- stop -i 2
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="2" status="stopped" reason="ok"></response>

Log closed at 2016-12-06 16:49:35

Additional Information

GET /ah_test.php HTTP/1.1
Host: events.docker.dev
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: de-AT,de;q=0.8,de-DE;q=0.6,en-GB;q=0.4,en;q=0.2,en-US;q=0.2
(NO Cookies sent!)

PHP Version 5.6.28

System Linux 89c70245635d 4.4.16-boot2docker #1 SMP Fri Jul 29 00:13:24 UTC 2016 x86_64
Build Date Nov 15 2016 00:41:31
Configure Command './configure' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--disable-cgi' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-curl' '--with-libedit' '--with-openssl' '--with-zlib' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data'
Server API FPM/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc/php
Loaded Configuration File (none)
Scan this dir for additional .ini files /usr/local/etc/php/conf.d
Additional .ini files parsed /usr/local/etc/php/conf.d/docker-php-ext-gd.ini, /usr/local/etc/php/conf.d/docker-php-ext-mcrypt.ini, /usr/local/etc/php/conf.d/docker-php-ext-mysql.ini, /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini, /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini, /usr/local/etc/php/conf.d/docker-php-ext-soap.ini, /usr/local/etc/php/conf.d/docker-php-ext-zip.ini, /usr/local/etc/php/conf.d/php-local.ini, /usr/local/etc/php/conf.d/timezone.ini, /usr/local/etc/php/conf.d/xdebug.ini
PHP API 20131106
PHP Extension 20131226
Zend Extension 220131226
Zend Extension Build API220131226,NTS
PHP Extension Build API20131226,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters zlib., convert.iconv., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, mcrypt., mdecrypt.*

xdebug

xdebug support enabled
Version 2.5.0
IDE Key macgdbp
Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $
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 macgdbp no value
xdebug.max_nesting_level 256 256
xdebug.max_stack_frames -1 -1
xdebug.overload_var_dump 2 2
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 /tmp /tmp
xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p
xdebug.remote_addr_header no value no value
xdebug.remote_autostart Off Off
xdebug.remote_connect_back On On
xdebug.remote_cookie_expire_time 0 3600
xdebug.remote_enable On On
xdebug.remote_handler dbgp dbgp
xdebug.remote_host 192.168.99.1 localhost
xdebug.remote_log /var/www/html/xdebug_remote.log no value
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off
xdebug.show_error_trace 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 /tmp /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

TagsNo tags attached.
Operating SystemLinux 89c70245635d 4.4.16-boot2docker #1 SMP Fri Jul 29 00:13:24 UTC 2016 x86_64
PHP Version5.6.25-5.6.29

Activities

derick

2016-12-06 19:14

administrator   ~0003950

phpinfo() output also shows the content of the $_SERVER variable - can you reproduce that too here?

aheissenberger

2016-12-06 20:05

reporter   ~0003957

PHP Variables

Variable Value
_REQUEST["PHPSESSID"] b46d819c493ad7891639c66361a3ac49
_REQUEST["SnapABugRef"] http://events.docker.dev/cms/
_REQUEST["SnapABugHistory"] 1#
_REQUEST["SnapABugVisit"] 2#1481040145
_COOKIE["PHPSESSID"] b46d819c493ad7891639c66361a3ac49
_COOKIE["SnapABugRef"] http://events.docker.dev/cms/
_COOKIE["SnapABugHistory"] 1#
_COOKIE["SnapABugVisit"] 2#1481040145
_SERVER["PATH"] /usr/local/apache2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_SERVER["HOSTNAME"] 89c70245635d
_SERVER["TZ"] Europe/Vienna
_SERVER["XDEBUG_CONFIG"] remote_host=192.168.99.1
_SERVER["PHPIZE_DEPS"] autoconf file g++ gcc libc-dev make pkg-config re2c
_SERVER["PHP_INI_DIR"] /usr/local/etc/php
_SERVER["PHP_EXTRA_CONFIGURE_ARGS"] --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data
_SERVER["GPG_KEYS"] 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
_SERVER["PHP_VERSION"] 5.6.28
_SERVER["PHP_URL"] https://secure.php.net/get/php-5.6.28.tar.xz/from/this/mirror
_SERVER["PHP_ASC_URL"] https://secure.php.net/get/php-5.6.28.tar.xz.asc/from/this/mirror
_SERVER["PHP_SHA256"] 07187ba2870f89cef334cd2ad6cb801aeec5eaf283da0293a9a6be75d6786d11
_SERVER["PHP_MD5"] 1e01c66b2e67ab3b56a6180ee560fe4c
_SERVER["HOME"] /var/www
_SERVER["USER"] www-data
_SERVER["FCGI_ROLE"] RESPONDER
_SERVER["DEVSYSTEM"] docker
_SERVER["proxy-nokeepalive"] 1
_SERVER["HTTP_HOST"] events.docker.dev
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_CACHE_CONTROL"] max-age=0
_SERVER["HTTP_UPGRADE_INSECURE_REQUESTS"] 1
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
_SERVER["HTTP_ACCEPT"] text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate, sdch
_SERVER["HTTP_ACCEPT_LANGUAGE"] de-AT,de;q=0.8,de-DE;q=0.6,en-GB;q=0.4,en;q=0.2,en-US;q=0.2
_SERVER["HTTP_COOKIE"] PHPSESSID=b46d819c493ad7891639c66361a3ac49; SnapABugRef=http%3A%2F%2Fevents.docker.dev%2Fcms%2F%20; SnapABugHistory=1#; SnapABugVisit=2#1481040145
_SERVER["SERVER_SIGNATURE"] no value
_SERVER["SERVER_SOFTWARE"] Apache/2.4.23 (Unix)
_SERVER["SERVER_NAME"] events.docker.dev
_SERVER["SERVER_ADDR"] 172.27.0.4
_SERVER["SERVER_PORT"] 80
_SERVER["REMOTE_ADDR"] 192.168.99.1
_SERVER["DOCUMENT_ROOT"] /var/www/html
_SERVER["REQUEST_SCHEME"] http
_SERVER["CONTEXT_PREFIX"] no value
_SERVER["CONTEXT_DOCUMENT_ROOT"] /var/www/html
_SERVER["SERVER_ADMIN"] you@example.com
_SERVER["SCRIPT_FILENAME"] /var/www/html/ah_info.php
_SERVER["REMOTE_PORT"] 63638
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /ah_info.php
_SERVER["SCRIPT_NAME"] /ah_info.php
_SERVER["PHP_SELF"] /ah_info.php
_SERVER["REQUEST_TIME_FLOAT"] 1481042195.2236
_SERVER["REQUEST_TIME"] 1481042195
_SERVER["argv"]
Array
(
)
_SERVER["argc"] 0
_ENV["PATH"] /usr/local/apache2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_ENV["HOSTNAME"] 89c70245635d
_ENV["TZ"] Europe/Vienna
_ENV["XDEBUG_CONFIG"] remote_host=192.168.99.1
_ENV["PHPIZE_DEPS"] autoconf file g++ gcc libc-dev make pkg-config re2c
_ENV["PHP_INI_DIR"] /usr/local/etc/php
_ENV["PHP_EXTRA_CONFIGURE_ARGS"] --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data
_ENV["GPG_KEYS"] 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
_ENV["PHP_VERSION"] 5.6.28
_ENV["PHP_URL"] https://secure.php.net/get/php-5.6.28.tar.xz/from/this/mirror
_ENV["PHP_ASC_URL"] https://secure.php.net/get/php-5.6.28.tar.xz.asc/from/this/mirror
_ENV["PHP_SHA256"] 07187ba2870f89cef334cd2ad6cb801aeec5eaf283da0293a9a6be75d6786d11
_ENV["PHP_MD5"] 1e01c66b2e67ab3b56a6180ee560fe4c
_ENV["HOME"] /var/www
_ENV["USER"] www-data
_ENV["FCGI_ROLE"] RESPONDER
_ENV["DEVSYSTEM"] docker
_ENV["proxy-nokeepalive"] 1
_ENV["HTTP_HOST"] events.docker.dev
_ENV["HTTP_CONNECTION"] keep-alive
_ENV["HTTP_CACHE_CONTROL"] max-age=0
_ENV["HTTP_UPGRADE_INSECURE_REQUESTS"] 1
_ENV["HTTP_USER_AGENT"] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
_ENV["HTTP_ACCEPT"] text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
_ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate, sdch
_ENV["HTTP_ACCEPT_LANGUAGE"] de-AT,de;q=0.8,de-DE;q=0.6,en-GB;q=0.4,en;q=0.2,en-US;q=0.2
_ENV["HTTP_COOKIE"] PHPSESSID=b46d819c493ad7891639c66361a3ac49; SnapABugRef=http%3A%2F%2Fevents.docker.dev%2Fcms%2F%20; SnapABugHistory=1#; SnapABugVisit=2#1481040145
_ENV["SERVER_SIGNATURE"] no value
_ENV["SERVER_SOFTWARE"] Apache/2.4.23 (Unix)
_ENV["SERVER_NAME"] events.docker.dev
_ENV["SERVER_ADDR"] 172.27.0.4
_ENV["SERVER_PORT"] 80
_ENV["REMOTE_ADDR"] 192.168.99.1
_ENV["DOCUMENT_ROOT"] /var/www/html
_ENV["REQUEST_SCHEME"] http
_ENV["CONTEXT_PREFIX"] no value
_ENV["CONTEXT_DOCUMENT_ROOT"] /var/www/html
_ENV["SERVER_ADMIN"] you@example.com
_ENV["SCRIPT_FILENAME"] /var/www/html/ah_info.php
_ENV["REMOTE_PORT"] 63638
_ENV["GATEWAY_INTERFACE"] CGI/1.1
_ENV["SERVER_PROTOCOL"] HTTP/1.1
_ENV["REQUEST_METHOD"] GET
_ENV["QUERY_STRING"] no value
_ENV["REQUEST_URI"] /ah_info.php
_ENV["SCRIPT_NAME"] /ah_info.php

aheissenberger

2016-12-06 20:52

reporter   ~0003958

I found the problem - I was setting the XDEBUG_CONFIG: "remote_host=192.168.99.1" with in the environment of the docker container (a solution I found on google:-). This was activating the debugger.

Here is a docker compose setup to test:
https://github.com/aheissenberger/xdebug-docker.git

Here is the setting that created the problem:
https://github.com/aheissenberger/xdebug-docker/blob/master/docker-compose.yml

You can close this request - Thanks for your help.

aheissenberger

2016-12-06 21:20

reporter   ~0003959

And I found a better solution:

docker-compose.yml:
phpapache:
environment:
DOCKER_XDEBUG_REMOTE_HOST: "192.168.99.1"

php.ini
xdebug.remote_host=${DOCKER_XDEBUG_REMOTE_HOST}

derick

2016-12-06 21:55

administrator   ~0003960

I was just about going to write that you had set that environment variable. In any case, great that you found the problem yourself.

Thanks for reporting it.

Issue History

Date Modified Username Field Change
2016-12-06 17:12 aheissenberger New Issue
2016-12-06 19:14 derick Note Added: 0003950
2016-12-06 19:14 derick Assigned To => derick
2016-12-06 19:14 derick Status new => feedback
2016-12-06 20:05 aheissenberger Note Added: 0003957
2016-12-06 20:05 aheissenberger Status feedback => assigned
2016-12-06 20:52 aheissenberger Note Added: 0003958
2016-12-06 21:20 aheissenberger Note Added: 0003959
2016-12-06 21:55 derick Note Added: 0003960
2016-12-06 21:55 derick Status assigned => resolved
2016-12-06 21:55 derick Resolution open => no change required
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging