Answer the question
In order to leave comments, you need to log in
How to get php-apache to work with xdebug in docker linked with netbeans?
Hello.
I tried a bunch of manuals from the net, but there is no connection between xdebug and netbeans.
xdebug.ini
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9001
xdebug. remote_autostart=0
xdebug.remote_connect_back=1
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/var/www/html/xdebug.log"
FROM php:7.2-apache
RUN apt-get update &&\
apt-get install --no-install-recommends --assume-yes --quiet ca-certificates curl git nano &&\
rm -rf /var/lib/apt/lists/*
RUN pecl install xdebug && docker-php-ext-enable xdebug
COPY xdebug.ini /usr/local/etc/php/
Answer the question
In order to leave comments, you need to log in
dachshund, I'm answering my own question, with a slight correction - I switched to nginx and php7.2-fpm ..
But I think the problem would be solved on php-apache too.
The main error is the
Address that xdebug receives, unfortunately not the one we need. We take the correct address from the Docker
settings
Docker->settings->Network->Subnet Address
In my case it is "xx.yy.zz.0" -> paste it into the config and change 0 to 1:
and voila...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question