|
| 1 | +# Configure PHPStorm with MacOS |
| 2 | + |
| 3 | +Inspired from this following links : |
| 4 | + |
| 5 | +- [Running PHPUnit Tests in PhpStorm with Docker](https://www.youtube.com/watch?v=I7aGWO6K3Ho) |
| 6 | +- [All hail Xdebug and lets let var dump die](http://jamescowie.me/blog/2016/12/all-hail-xdebug-and-lets-let-var-dump-die/) |
| 7 | + |
| 8 | +## Edit PHP configuration |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## Add a PHP interpreter |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +## Configure PHPUnit |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +### Add test configuration |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +### PHPUnit Demo |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +## Configure XDebug |
| 29 | + |
| 30 | +### Edit `etc/php.ini` file |
| 31 | + |
| 32 | +Add this following lines : |
| 33 | + |
| 34 | +```sh |
| 35 | +[xdebug] |
| 36 | +xdebug.remote_host = 10.254.254.254 |
| 37 | +xdebug.remote_port = 9000 |
| 38 | +xdebug.remote_autostart=1 |
| 39 | +xdebug.idekey = PHPSTORM |
| 40 | +xdebug.remote_enable = 1 |
| 41 | +xdebug.remote_connect_back = 0 |
| 42 | +xdebug.profiler_enable = 1 |
| 43 | +``` |
| 44 | + |
| 45 | +### Check Debug section |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +### Add a debug server |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +### Configure XDebug Proxy |
| 54 | + |
| 55 | +Create an IP Alias : |
| 56 | + |
| 57 | +```sh |
| 58 | +sudo ifconfig en0 alias 10.254.254.254 255.255.255.0 |
| 59 | +``` |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +To delete an IP Alias : |
| 64 | + |
| 65 | +```sh |
| 66 | +sudo ifconfig en0 -alias 10.254.254.254 |
| 67 | +``` |
| 68 | + |
| 69 | +### XDebug Demo |
| 70 | + |
| 71 | + |
0 commit comments