I've a problem with Xdebug in my development environment.
FROM library/php:5.5-apache
RUN apt-get -qqy update && apt-get -qqy install \
libpq-dev \
libmcrypt-dev \
libxml2-dev \
ssl-cert \
vim \
git \
mc \
&& rm -r /var/lib/apt/lists/*
# compile and add xdebug
RUN pecl install xdebug \
&& echo "zend_extension=xdebug.so" >> "/usr/local/etc/php/conf.d/xdebug.ini"
# configure apache and vhosts
RUN a2enmod rewrite ssl \
&& a2ensite 000-default default-ssl
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
ENV APACHE_LOCK_DIR /var/lock/apache2
CMD ["apache2-foreground"]
Xdebug settings:
[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_host=172.17.42.1
xdebug.remote_port=9000
Everything works good but one thing. When debugging the code:
<?php
class A {
static private $a;
static public function init() {
self::$a = 123;
}
}
A::init();
If I set a breakpoint on self::$a = 123;
or step into the line, I get:
Fatal error: Access to undeclared static property: A::$a
If I don't step into that line, the debugging session continues without any problems.
What's wrong?