Php -S 0.0.0.0:80 -t /var/www/html File docker-compose. This is a simple bash script: #!/usr/bin/env bash We use a bash script named start-container as the default command for the image. So, we'll see xdebug.remote_host=192.168.1.2 in xdebug.ini for now. This means the container is reaching out of the container to my host machine to send debugging information. What finally got my Postman/PHPStorm Xdebug working was adding a PHP Remote Debug configuration in PHPStorm: Run -> Edit Configurations -> + -> PHP Remote Debug I just set the name to localhost and saved it - no IDE Key, etc. This must be the same port number as specified in the php.ini file: Xdebug 3. In the Xdebug area, specify the following settings: Debug port: appoint the port through which the tool will communicate with IntelliJ IDEA. We use my Mac's private network IP address for the remote_host, as this configuration is telling xdebug where to reach PHPStorm, which will be listening on my host machine for xdebug connections. In the IDE settings ( Ctrl Alt 0S ), select Debug under the PHP node to open the Debug page. RUN chmod +x usr/local/bin/start-containerĬMD File xdebug.ini zend_extension=xdebug.so & rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*ĬOPY xdebug.ini /etc/php/7.0/mods-available/xdebug.iniĬOPY start-container /usr/local/bin/start-container This page helps you finding which file to download, and how to configure PHP to get Xdebug running. & apt-get remove -y -purge software-properties-common \ Download the Xdebug extension compatible with your PHP version and install it as described in the Xdebug installation guide. & php -r "readfile('') " | php -install-dir=/usr/bin/ -filename=composer \ You will have to do the following: Put the host as localhost (unless you plan to use a custom loopback domain) and 8000 as the port (unless you decided for other number). Click on the wrench icon in the toolbar: You can also get to the project settings by going to: PHPStorm > Preferences (OSX) or File > Settings (Windows, Linux). Otherwise you will have to select PHP Built-in Web Server and configure the server manually practically the same thing but with some additional steps. Php7.0-pgsql php7.0-imap php-memcached php7.0-mbstring php7.0-xml php7.0-curl \ To get started configuring your PHPStorm IDE open the application settings. To view Xdebug configuration parameters, open the phpstormindex.php file from the downloaded script package in the browser. & apt-get install -y php7.0-fpm php7.0-cli php7.0-mcrypt php7.0-gd php7.0-mysql \ & apt-get install -y curl zip unzip git software-properties-common sqlite3 \
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |