![phpstorm xdebug phpstorm xdebug](https://i.stack.imgur.com/ZZ3v5.png)
So, using docker-compose, we now inject the local ini file into the php container’s conf.d directory.
Phpstorm xdebug windows#
Windows does the same at the time of writing, but Linux distributions might need a bit of research to get the correct address in here to connect into Docker. In our case, we develop as a company with Macs, so it’s handy that Docker has a reserved handle ( ) to route into the correct IP. Xdebug.remote_host is the point at which our Docker configuration starts making the process perhaps a little convoluted.
Phpstorm xdebug free#
So, it’s important to set the remote port to 9001 (or whichever free port you wish) to stop clashes. I guess it’s an interesting aspect that shows Xdebug’s history in that it was probably chosen as a default port before the CGI adopted replacement php-fpm used port 9000. Xdebug.remote_port has an interesting quirk in that if you don’t set the parameter, it defaults to port 9000. Do I wish I’d have known about this years ago? For sure.
Phpstorm xdebug code#
Enable remote triggering of the Xdebug server and set autostart to true when either a breakpoint is hit in the code or you’ve set the break to be at the entry point to your application’s code and: bingo. Remember me mentioning “bookmarklets” in the browser earlier? You have to use an extension to keep a server connection alive with your Xdebug session – for example, for Firefox: Xdebug.remote_enable and tostart are more interesting.
![phpstorm xdebug phpstorm xdebug](https://i.ytimg.com/vi/rqDDJfG6ip4/maxresdefault.jpg)
Zend_extension has always been the PHP ini file parameter name for adding in extensions – it hooks the pecl extension (or extensions installed with other tools like PEAR) installed to the runtime, so things like zip, redis, curl and the like use the same parameter to enable them. I said this wouldn’t just be a copy and paste article, so: what are these parameters?
Phpstorm xdebug install#
Our project had this in our Dockerfile to install redis and imagick:Įnter fullscreen mode Exit fullscreen mode So, to install Xdebug, you need to include it with pecl (you can still -only- use pecl for operating system-level dependencies at the time of writing). Part of what made the installation significantly easier for me was that the project it was being installed on was already using a Dockerfile as part of the stack.