You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: I hadn't been able to figure out why breakpoints were being skipped when the vdebug connection otherwise worked properly. It turns out if a path_maps path contains a symlink, it will not work properly.
In my case, /var/www is a symlink to /home/derek/www
So this has the issue where breakpoints fail
let g:vdebug_options['path_maps'] = {'/var/www/local.laravel': '/var/www/local.laravel'}
And this works properly
let g:vdebug_options['path_maps'] = {'/var/www/local.laravel': '/home/derek/www/local.laravel'}
Below is the original issue as posted
Sorry if this is the wrong place for this but I don't know where this is failing. I have a successful connection and can step forward in the code. But setting a breakpoint then pressing F5 to go to the breakpoint (or disabling break on entry) will execute the rest of the code without hitting the breakpoint and I can't figure it out.
I've tried various versions of setting path_map without any success.
I am able to successfully configure xdebug without issue outside of Docker. Just when the image is running, the breakpoints don't stop despite being set. I've gone through old issues describing similar things but they seem to eventually reach the conclusion of it being fixed in a later version.
vdebug.log (I removed the lines for keymapper that severely bloated the output, if they're needed I can add them.
FROM php:7.4-apache
# install linux packages
RUN apt-get update && apt-get install -y \
git \
libzip-dev \
zip \
curl
# install and enable PHP extensions
RUN pecl install -o -f xdebug-2.8.1
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install calendar
RUN docker-php-ext-configure zip --with-libzip
RUN docker-php-ext-install zip
RUN docker-php-ext-enable xdebug
# clear tmp pear install files
RUN rm -rf /tmp/pear;
# copy virtualhost files into the container
COPY ./sites-available/* /etc/apache2/sites-available/
# copy php.ini
ADD ./php.ini /usr/local/etc/php/
# enable the sites
RUN cd /root \
&& ln -s /etc/apache2/sites-available/local.laravel.conf /etc/apache2/sites-enabled/
My local and docker PHP version output is the same
PHP 7.4.0 (cli) (built: Nov 28 2019 07:27:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies
with Xdebug v2.8.1, Copyright (c) 2002-2019, by Derick Rethans
Thanks in advance for any suggestions or insight.
The text was updated successfully, but these errors were encountered:
elle-the-dev
changed the title
Breakpoints are ignored with docker goes straight to completion
path_map to a local symlink causes ignoring breakpoints, goes straight to completion
Dec 19, 2019
elle-the-dev
changed the title
path_map to a local symlink causes ignoring breakpoints, goes straight to completion
path_maps path to a local symlink causes ignoring breakpoints, goes straight to completion
Dec 19, 2019
EDIT: I hadn't been able to figure out why breakpoints were being skipped when the vdebug connection otherwise worked properly. It turns out if a
path_maps
path contains a symlink, it will not work properly.In my case,
/var/www
is a symlink to/home/derek/www
So this has the issue where breakpoints fail
And this works properly
Below is the original issue as posted
Sorry if this is the wrong place for this but I don't know where this is failing. I have a successful connection and can step forward in the code. But setting a breakpoint then pressing F5 to go to the breakpoint (or disabling break on entry) will execute the rest of the code without hitting the breakpoint and I can't figure it out.
I've tried various versions of setting
path_map
without any success.I am able to successfully configure xdebug without issue outside of Docker. Just when the image is running, the breakpoints don't stop despite being set. I've gone through old issues describing similar things but they seem to eventually reach the conclusion of it being fixed in a later version.
vdebug.log (I removed the lines for keymapper that severely bloated the output, if they're needed I can add them.
.vimrc vdebug config
php.ini xdebug
Dockerfile
docker-compose.yml
When it's started with break on entry
After I hit F5 with a break in the controller
My local and docker PHP version output is the same
Thanks in advance for any suggestions or insight.
The text was updated successfully, but these errors were encountered: