Now, you should see on the right side of the address bar the extension's symbol. Make sure that the extension is enabled on your browser's extensions list page. Now that Vagrant with Xdebug is up and running, let's configure Xdebug Chrome extension.įirst, we need to install it from Chrome Web Store Step3: Configure Xdebug Use Xdebug to debug your web application on Chrome Check "Use path mappings" checkbox, and write the project's absolute path.To fully configure this debugger configuration, you will need to create what PhpStorm calls a server. We will use the IDE key configured in your Vagrant and in your browser. Then, add a new "PHP Remote Debug" configuration. Step2: Configure PhpStormįirst, select the "Edit configurations" item in the "Run" menu. Then set a breakboint in the index.php file and load page from browser.If you use Ansible to provision your virtual machine, you can also use a ready-to-action Xdebug role. If your index.php is located under /home/lanoxx/project/index.php enter the same location under "Absolute path on the server". The next one sounds stupid but worked for me. Now check the "Use path mappings" and scroll down to your index.php or some other uniqe entry point you can reach from the browser. mydomain.local if existing and enter mydomain.local as host name, with port 80 and XDEBUG. In there select the server you set up e.g. To do this go to Settings -> Languages & Frameworks -> PHP -> Server. Or export those setting when debugging from command line.įor xdebug.ini xdebug.remote_host=mydomain.local įor command line usage: export PHP_IDE_CONFIG=serverName=mydomain.local php -dxdebug.remote_autostart=1 -dxdebug.remote_connect_back=1 -dxdebug.remote_host=mydomain.local. What helped me was adding the remote host name/ip to the xdebug, when debugging for browser call. It will do it's work but don't stop on break points because it thinks it's not needed for the current request. But first you questions:Īnswer: I don't know exactly but I suspect based on that it works when you explicitly specify ?XDEBUG_SESSION_START=PHPSTORM or "break on first line", it is ignoring the incoming request. I had the same problem in PHPStorm 9 while debugging code inside a virtual machine. I think it was automatically installed with php. I am not quite sure why its installed or if I need it. I have a php extension installed that is called fpm. With Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick RethansĪnd my Apache virtual host configuration: Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies Update: Added my PHP and XDebug version output from php -v: PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Question: Why is the XDEBUG_SESSION cookie being ignored? Now if I explicitly use a URL with the following query parameter appended: ?XDEBUG_SESSION_START=PHPSTORM then all my breakpoints are properly being breaked in IntelliJ. 'mydomain.local' server at PHP|Servers or enable Break at first line in To figure out the problem check path mappings configuration for It may be caused by path mappings misconfiguration or not synchronized The warning that I see looks like this: Debug session was finished without being paused If I disable that option, I get a warning that no breakpoint was hit, even though I have a break point set and I am certain that the code is being executed. If I enable Break at first line in PHP scripts, then the debugger immediately breaks at the first breakable location inside the index.php. In IntelliJ I have setup a Server pointing to mydomain.local and in the run configuration I am using that server and have set the Ide Key to PHPSTORM. I have configured php with the xdebug plugin using the following settings: xdebug.extended_info = 1 In the Developer Tools under Cookies I can see that the XDEBUG_SESSION cookie is set to PHPSTORM. I am trying to debug a Drupal website with the PHP plugin in Intellij (would be the same in PhpStorm).Ĭhrome Browser pointing to a localhost alias mydomain.local and the XDebug Helper extension is installed and set to Debug.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |