bulooki.blogg.se

Phpstorm xdebug
Phpstorm xdebug







phpstorm xdebug

I keep these values in the 20-xdebug.ini file because they are good to know. Xdebug.remote_host=”your localhost address”įrom the explanation of the 20-xdebug.ini file that is written bellow, you will see that some of these settings are not needed, or that they are set to a default value. Now open the 20-xdebug.ini file and paste this in: zend_extension=”location to your xdebug.so file” You can see my project is made in PHP5, so change your folder name/location according to your version of PHP. You can create one using commands such as touch, vim, vi, nano and so on. Now you need to navigate inside your server to a location: /etc/php5/apache2/conf.d/ and check if the file 20-xdebug.ini exists there. Copy the location somewhere as you will use it later on. Getting startedįirst you need to find the location of the xdebug.so file on your server. In this tutorial I will assume you have Xdebug installed. However, as my project is using PHP5, I’ve had to do it the old fashioned way: looking it up on forums. If you don’t have Xdebug installed on your server but are using PHP7, you can do it by using Tailored Installation Instructions from the official Xdebug site here. The goal of this tutorial is to get the Xdebug working on your server and then point PhpStorm to Xdebug. It collapses from time to time so I have to redo this setup, and therefore I know this setup works :). The app I am working on runs inside of a Vagrant box which is shaky somehow.

#PHPSTORM XDEBUG HOW TO#

Since there aren’t many tutorials on how to do it, I’ve encountered some problems on how to get the setup up and running.īy combining a few tutorials and spending a few hours on several forums, I came up with this text. zend_extension=/Applications/MAMP/bin/php5.2/zend/lib/ZendExtensionManager.Recently I started focusing more on PHP, and I needed to set up a local debugging environment. Zend_extension_manager.optimizer=/Applications/MAMP/bin/php5.2/zend/lib/Optimizer-3.3.9 Zend_extension="/Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so" The php.ini file is configured like this: So I would like to start the debugger using the option "Wait for Xdebug connection with ide key", so PhpStorm silently starts the debugger (without popping up a dummy page) and waits for the Flex client to trigger some activity involving any of the project associated PHP classes. My usecase: I am debugging a PHP WebOrb server component which feeds my Flex client via AMF3 service requests (started from IDEA) - this means that the PHP data never feeds a real HTML page. so I assume that the server path mappings are correct. I got everything to work with breakpoints when I use the option "Open web page in browser" in the debug configuration dialog / Debug (see attachment 1). Maybe I was not clear enough in my first post.

phpstorm xdebug

One caveat is that you have to make the debugging profile for the file name that will appear in the browser.Įg: if you have index.php which includes counter.php and you want to debug counter.php then you need to make the debug profile for index.php. (This should open the debugging panel with "Waiting for connection on port 9000 with ide key 'PhpStorm1' " in the debugger variables section.) In firefox under TOOLS -> ADDONS -> EXTENSIONS -> EASY XDEBUG -> PREFERENCES change the Xdebug.idekey value to 'PhpStorm1'Ĭlick on the xdebug icon in the bottom left of firefox to turn the easy xdebug on.Ĭlick the debug button in the IDE. Get the easy xdebug extension for firefox ( ) Select the debug configuration and under the 'debug' section set it to "Wait for Xdebug connection with ide key" set that to 'PhpStorm1'. go and look for it in RUN->EDIT CONFIGURATIONS-> PHP on Server. Since you have started it already there will already be a debugging configuration. If you have got it working by starting it from the IDE and now want to go the other way you could do it like this:









Phpstorm xdebug