Code Monkey home page Code Monkey logo

xdebug-phpunit-docker-phpstorm's Introduction

Docker + XDebug + Apple Macintosh

Example for configuring xdebug with PHPStorm and Docker nginx/php-fpm environment

Important IDE and Environment Setup:

Preferences -> Languages and Frameworks -> PHP -> DBGp Proxy

  • IDE key: PHPSTORM
  • Host: 10.254.254.254
  • Port: 9000

Preferences -> Languages and Frameworks -> PHP -> Servers

  • Name: docker-local
  • Host: 10.254.254.254
  • Port: 8080
  • Debugger: Xdebug
  • Use path mappings: app -> /app

Preferences -> Languages and Frameworks -> PHP -> Test Frameworks

  • (Add new)
  • CLI interpreter: click the ellipsis to set up for docker-compose in this repo
  • PHPUnit library: Path to phpunitnit.phar
  • Path to phpunit.phar: /usr/local/bin/phpunit

Run configurations -> (create new) PHP Remote Debug

  • Name: xdebug
  • Filter debug connection by IDE key: checked
  • Server: docker-local
  • IDE key: PHPSTORM

Run configurations -> (create new) Docker -> docker-compose

  • Name: docker-compose
  • Server: Docker (maybe need to create new)
  • Compose file: docker-compose.yml (the one in this repo)

Run configurations -> (create new) PHPUnit

  • Name: test
  • Test scope: directory
  • Directory: [/path/to/repo]/app/test
  • Test runner options: —bootstrap /app/test_autoload.php

References:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.