Finally I would like to recommend you this extremely smart Chrome browser plugin. Now I was able to debug the web browser provided by the presets and even my cli scripts. Inside XDEBUG_CONFIG you’ll find a blank-separated list of configuration. Vendor/bin/phpunit -bootstrap tests/bootstrap.php -stderr tests/ $1 Setting up Xdebug locally, in Vagrant or in Docker Debugging in Phpstorm You can follow along with the xdebug-example GitHub repository I have used throughout this guide. A simple bash script would help me here: export XDEBUG_CONFIG = "remote_connect_back=0 idekey=intellij remote_host=10.0.2.2" export PHP_IDE_CONFIG = "serverName=yext.local" Then I needed to override the remote_connect_back setting and tell xdebug where it should connect. I first followed the setup in Intellij (or PHPStorm). This table tells me my Gateway is 10.0.2.2. The trick is to find out what IP my original host running IntelliJ has.įor this post I removed a few portions of the output. Unfortunately when I run PHPUnit from inside my VM there is no such client. Xdebug will try to reconnect to the client which made the request. Unfortunately it caused me some headache to find out why IntelliJ succeeded in remote debugging when a request came from the web browser but failed when it came from PHPUnit.īy default, PuPHPet creates an xdebug.ini which looks similar to that: fault_enable = 1 To do this, open PhpStorm and then follow the steps below: Go to Settings, then Language & Frameworks, and then PHP Click the more icon (. I love my xdebug php debugger even on commandline. For PHP projects I use PuPHPet, which is a web-based gui for quickly creating the necessary Vagrant files. That’s great, because I can commit the definition of my environment to an SCM like GIT and my colleagues can work with exactly the same environment without dealing with installing all software manually. Vagrant helps your to create a development environment based on a VirtualBox VM (or, if you like even VMWare). , search vor PHPUnit, choose the entry under Language & Frameworks > PHP and click on the green. For quite a while now I am a huge fan of Vagrant.
0 Comments
Leave a Reply. |