1/9/2024 0 Comments Phpstorm docker xdebugStep 1: you should identify whether it’s a complete lack of communication between Xdebug and the IDE, or if PhpStorm is receiving the data the data but is setup wrong.Ĭlose and restart PhpStorm. ![]() ( The following is based on Xdebug 2.4.0RC4 and PhpStorm 2016.2.1) On other installations, here’s my growing checklist when I try to use Xdebug and nothing happens: Then run vagrant provision to build/rebuild (this won’t affect your site). To turn on xdebug, make sure you’ve got: php_xdebug_default_enable: 1 CLI: /Applications/DevDesktop/apache/bin/apachectl -k restart.the UI but with keyboard shortcuts, cmd-2 (stop) then cmd-1 (start).Uncomment the zend xdebug extension and turn on remote_enable zend_extension=xdebug.so Acquia Dev Desktop:Įdit /Applications/DevDesktop/php7_1/bin/php.ini There’s an element of “it just works” for Xdebug in the server/PhpStorm configuration when using Acquia Dev Desktop or Drupal VM. (In fact, I don’t think it’s worked correctly first time for me once.)Īlso, you’ve probably got multiple projects, maybe running on different VMs, or using Docker (scroll down for special instructions for Docker on the Mac). Unfortunately, while the setup should be straightforward, it’s easy to lose the programming time you save spending ages tweaking your Xdebug and PhpStorm configuration to get it to work in the first place. No need to manual add var_dump() statements etc. When this setting is set to 1, Xdebug will always attempt to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE variable was not present.Running Xdebug remotely is very useful – you can add breakpoints, inspect and modify the state of all variables/objects and type PHP code into a live console. Normally you need to use a specific HTTP GET/POST variable to start remote debugging (see Step Debugging). The solution to let it work everytime was to add following: xdebug.remote_autostart=1 That was because the special cookie still was set in the normal browser store (cookie that was stored either from the Browser extension that I have already uninstalled, or from trying out the JetBrains Bookmarklets generator before writing the question). To be sure i tried to open it also in a private browser session and it wasn't working anymore. Actually I had already tried to restart the Docker Desktop App before writing the question, maybe at that point my configurations were at a wrong state.īut at the end the solution was: Restarting the PC. :/usr/local/etc/php/php.iniĪfter booting up my machine to investigate further with the comments of and without changing anything, opening localhost:8080 suddenly let the debugging work by stoping at the breakpoint that i have set. I ended up at least to have separate containers, one as dev container with enabled Xdebug. For the debugger session I have also tried to install a browser extension that sets a cookie. I think the problem is either something with the ports that I don't understand, or it is something with the debugger session not being started or recognized. Troubleshooting common PHP debugging issues. ![]() Xdebug & Zend Debugger bookmarklets generator for PhpStorm.Zero-configuration Web Application Debugging with Xdebug and PhpStorm.Setting up Xdebug with Docker Compose and WordPress image. ![]() I've tried many things trying to let work Xdebug in a Docker container.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |