Search
 
SCRIPT & CODE EXAMPLE
 

PHP

xdebug vscode docker

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "pathMappings": {
                "/app": "${workspaceRoot}"
            },
            "preLaunchTask": "enable:xdebug",
            "postDebugTask": "disable:xdebug"
        },
    ]
}
Comment

xdebug vscode docker

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
      {
        "type": "shell",
        "command": "docker-compose exec exemplo sh -c 'sed -i "/xdebug.mode=off/cxdebug.mode=debug" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload'",
        "label": "enable:xdebug"
      },
      {
        "type": "shell",
        "command": "docker-compose exec exemplo sh -c 'sed -i "/xdebug.mode=debug/cxdebug.mode=off" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload'",
        "label": "disable:xdebug"
      }
    ]
  }
Comment

xdebug vscode docker

FROM php:7.4-apache

WORKDIR /app

RUN apt update

RUN apt install -y git libzip-dev zip &&  
    docker-php-ext-install zip mysqli pdo pdo_mysql && 
    docker-php-ext-enable pdo_mysql

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

RUN a2enmod rewrite

RUN rm -rf /var/www/html && 
    ln -s /app /var/www/html

RUN pecl install xdebug && docker-php-ext-enable xdebug

RUN echo "xdebug.mode=off" | tee -a /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini > /dev/null && 
    echo "xdebug.start_with_request=yes" | tee -a /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini > /dev/null && 
    echo "xdebug.client_host=host.docker.internal" | tee -a /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini > /dev/null
Comment

PREVIOUS NEXT
Code Example
Php :: PHP str_shuffle — Randomly shuffles a string 
Php :: auto submit button php 
Php :: php load specific post id on language 
Php :: exclude methods in resource route laravel 
Php :: to start XAMPP ubuntu 
Php :: php upload file via curl 
Php :: php base64 to image 
Php :: php serve 
Php :: php trim array to certain length 
Php :: php get last index end in foreach 
Php :: install php debian 10 
Php :: current directory php 
Php :: php remove everything after a specific character 
Php :: current loggedin user laravel 
Php :: drupal 8 get field entities 
Php :: php home url 
Php :: laravel join with multiple conditions 
Php :: laravel add column to existing table 
Php :: read csv php 
Php :: how to print count query in php 
Php :: php nan 
Php :: php mail success message 
Php :: laravel mixed content error 
Php :: wordpress get child posts 
Php :: time duration calculation laravel 
Php :: remove space from start and end of string in php 
Php :: laravel orderby with relation 
Php :: laravel env asset_url 
Php :: php object(stdclass) to array 
Php :: laravel keyby 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =