-
-
Save ernestoliberio/afd38e65de83e992a7d8f1b29c255f37 to your computer and use it in GitHub Desktop.
Revisions
-
ankurk91 revised this gist
May 8, 2021 . 2 changed files with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## :beetle: Install and Configure xDebug v3 on MacOS for PhpStorm :elephant: * Assuming that you have already installed php and apache via [Homebrew](https://brew.sh/) * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` @@ -42,8 +42,8 @@ sudo apachectl -k restart ``` * **Configure phpStorm** * Go through - Settings >> PHP >> Debug * Ensure that 'Debug port' is the same as you have in your `ext-xdebug.ini`. In our case it was `9003`. * Save and close the Settings Dialog * **Start debugging** @@ -52,8 +52,8 @@ sudo apachectl -k restart * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * Use [chrome extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) * Configure this chrome extension and set IDE Key to `PHPSTORM` * Visit your website * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` sudo apt-get install php7.4-xdebug ``` * **Edit your `xdebug.ini`** @@ -27,8 +27,8 @@ sudo service apache2 restart ``` * **Configure phpStorm** * Go through - Settings >> PHP >> Debug * Ensure that 'Debug port' is the same as you have in your `xdebug.ini`. In our case it was `9003`. * Save and close the Settings Dialog * **Start debugging** @@ -37,8 +37,8 @@ sudo service apache2 restart * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * Use [chrome extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) * Configure this chrome extension and set IDE Key to `PHPSTORM` * Visit your website * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! -
ankurk91 revised this gist
Apr 21, 2021 . 3 changed files with 29 additions and 32 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## :beetle: Install and Configure xDebug v3 on MacOS for PhpStorm :elephant: * Assuming that you have already installed php and apache via [Homebrew](https://brew.sh/) v1.6+ @@ -7,7 +7,7 @@ pecl channel-update pecl.php.net pecl clear-cache pecl install xdebug # Optional command pecl clear-cache @@ -18,14 +18,16 @@ pecl clear-cache - `/usr/local/etc/php/7.4/conf.d/ext-xdebug.ini` * Add these lines by overwriting exiting ``` # Configuration for Xdebug 3 [Xdebug] ;zend_extension="/usr/local/Cellar/php@742/7.4.11/pecl/20170718/xdebug.so" zend_extension="xdebug.so" xdebug.mode=debug,develop xdebug.start_with_request=default xdebug.idekey=PHPSTORM xdebug.client_port=9003 xdebug.file_link_format=phpstorm://open?%f:%l ``` * **Update your `php.ini`** @@ -41,20 +43,16 @@ sudo apachectl -k restart * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `ext-xdebug.ini`. In our case it was `9003`. * Save and close the Settings Dialog * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your website in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * Use [chrome extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) * Configure the chrome extension * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,25 @@ ## :beetle: Install and Configure xDebug v3 on Ubuntu for PhpStorm :elephant: * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` sudo apt-get install php-xdebug ``` * **Edit your `xdebug.ini`** * Your `xdebug.ini` file path should look like this - `/etc/php/7.4/mods-available/xdebug.ini` * Add these lines without modifying exiting ``` # Configuration for Xdebug 3 [Xdebug] zend_extension="xdebug.so" xdebug.mode=debug,develop xdebug.start_with_request=default xdebug.idekey=PHPSTORM xdebug.client_port=9003 xdebug.file_link_format=phpstorm://open?%f:%l ``` * Restart the apache server to reflect changes ``` @@ -25,20 +28,16 @@ sudo service apache2 restart * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `xdebug.ini`. In our case it was `9003`. * Save and close the Settings Dialog * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your website in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * Use [chrome extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) * Configure chrome extension * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm php debug settings * Set `xdebug.start_with_request` to `yes` if you don't want to bother with browser extensions ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) -
ankurk91 revised this gist
Apr 9, 2021 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pecl channel-update pecl.php.net pecl clear-cache pecl install xdebug-2.9.8 # Optional command pecl clear-cache This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` sudo apt-get install php7.4-xdebug ``` * **Edit your `xdebug.ini`** -
ankurk91 revised this gist
Nov 8, 2020 . No changes.There are no files selected for viewing
-
ankurk91 revised this gist
Nov 8, 2020 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,7 @@ ## :beetle: Install and Configure xDebug on MacOS for PhpStorm :elephant: * Assuming that you have already installed php and apache via [Homebrew](https://brew.sh/) v1.6+ * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` pecl channel-update pecl.php.net -
ankurk91 revised this gist
Nov 8, 2020 . 2 changed files with 4 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,22 +9,18 @@ pecl channel-update pecl.php.net pecl clear-cache pecl install xdebug # Optional command pecl clear-cache ``` * **Edit your `ext-xdebug.ini`** * Your `ext-xdebug.ini` file path should look like this (depends on php version installed) - `/usr/local/etc/php/7.4/conf.d/ext-xdebug.ini` * Add these lines by overwriting exiting ``` ;zend_extension="/usr/local/Cellar/php@742/7.4.11/pecl/20170718/xdebug.so" zend_extension="xdebug.so" xdebug.remote_enable = 1 xdebug.remote_port = 9000 @@ -37,7 +33,7 @@ xdebug.file_link_format = phpstorm://open?%f:%l * **Update your `php.ini`** * When installing xdebug extension using `pecl`, it also updates our `php.ini` file, but we don't need that. * Find your `php.ini` file, file path should look like this (depends on php version installed) - `/usr/local/etc/php/7.4/php.ini` * Remove any occurrence of `zend_extension="xdebug.so"` from this file * Restart the apache server to reflect changes This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,16 +3,12 @@ * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` sudo apt-get install php-xdebug ``` * **Edit your `xdebug.ini`** * Your `xdebug.ini` file path should look like this - `/etc/php/7.4/mods-available/xdebug.ini` * Add these lines without modifying exiting ``` xdebug.remote_enable = 1 -
ankurk91 revised this gist
Aug 16, 2019 . No changes.There are no files selected for viewing
-
ankurk91 revised this gist
Jul 6, 2019 . 2 changed files with 8 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,20 +9,22 @@ pecl channel-update pecl.php.net pecl clear-cache # If you have php v7.x pecl install xdebug # If you have php v5.6 # pecl install xdebug-2.5.5 # Optional command pecl clear-cache ``` * **Edit your `ext-xdebug.ini`** * Your `ext-xdebug.ini` file path should look like this (depends on php version installed) - `/usr/local/etc/php/7.2/conf.d/ext-xdebug.ini` * Add these lines by overwriting exiting ``` ;zend_extension="/usr/local/Cellar/php@7.2/7.2.13/pecl/20170718/xdebug.so" zend_extension="xdebug.so" xdebug.remote_enable = 1 xdebug.remote_port = 9000 @@ -35,7 +37,7 @@ xdebug.file_link_format = phpstorm://open?%f:%l * **Update your `php.ini`** * When installing xdebug extension using `pecl`, it also updates our `php.ini` file, but we don't need that. * Find your `php.ini` file, file path should look like this (depends on php version installed) - `/usr/local/etc/php/7.2/php.ini` * Remove any occurrence of `zend_extension="xdebug.so"` from this file * Restart the apache server to reflect changes This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ sudo apt-get install php5-xdebug * **Edit your `xdebug.ini`** * Your `xdebug.ini` file path should look like this - `/etc/php/7.2/mods-available/xdebug.ini` * Add these lines without modifying exiting ``` xdebug.remote_enable = 1 -
ankurk91 revised this gist
Dec 30, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## :beetle: Install and Configure xDebug on MacOS for PhpStorm :elephant: :warning: This guide only applies to [Homebrew](https://brew.sh/2018/04/09/homebrew-1.6.0/) v1.6+ * Check your version `brew --version` before proceeding -
ankurk91 revised this gist
Nov 4, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ pecl clear-cache - `/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini` * Add these lines by overwriting exiting ``` ;zend_extension="/usr/local/Cellar/[email protected]/7.1.21/pecl/20160303/xdebug.so" zend_extension="xdebug.so" xdebug.remote_enable = 1 xdebug.remote_port = 9000 -
ankurk91 revised this gist
Aug 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ pecl clear-cache # If you have php v5.6 pecl install xdebug-2.5.5 # If you have php v7.x pecl install xdebug pecl clear-cache ``` -
ankurk91 revised this gist
Jul 10, 2018 . 3 changed files with 9 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## :beetle: Install and Configure xDebug on Mac for PhpStorm :elephant: :warning: This guide only applies to [Homebrew](https://brew.sh/2018/04/09/homebrew-1.6.0/) v1.6+ * Check your version `brew --version` before proceeding @@ -9,16 +9,16 @@ pecl channel-update pecl.php.net pecl clear-cache # If you have php v5.6 pecl install xdebug-2.5.5 # If you have php v7.x pecl install php-xdebug pecl clear-cache ``` * **Edit your `ext-xdebug.ini`** * Your `ext-xdebug.ini` file path should look like this (depends on php version installed) - `/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini` * Add these lines by overwriting exiting ``` @@ -34,24 +34,23 @@ xdebug.file_link_format = phpstorm://open?%f:%l * **Update your `php.ini`** * When installing xdebug extension using `pecl`, it also updates our `php.ini` file, but we don't need that. * Find your `php.ini` file, file path should look like this (depends on php version installed) - `/usr/local/etc/php/7.1/php.ini` * Remove any occurrence of `zend_extension="xdebug.so"` from this file * Restart the apache server to reflect changes ``` sudo apachectl -k restart ``` * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `ext-xdebug.ini`. In our case it was `9000`. * Save and close the Settings Dialog * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your website in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * In your browser access your project url like this This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## :beetle: Install and Configure xDebug on Ubuntu for PhpStorm :elephant: * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** @@ -34,7 +34,7 @@ sudo service apache2 restart * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your website in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * In your browser access your project url like this File renamed without changes. -
ankurk91 revised this gist
Jul 10, 2018 . 4 changed files with 149 additions and 96 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,66 @@ ## :beetle: Install and Configure xDebug on Mac and PhpStorm :elephant: :warning: This guide only applies to [Homebrew](https://brew.sh/2018/04/09/homebrew-1.6.0/) v1.6+ * Check your version `brew --version` before proceeding * Assuming that you have already installed php and apache via [Homebrew](https://brew.sh/) v1.6+ * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` pecl channel-update pecl.php.net pecl clear-cache # Example for php v5.6 pecl install xdebug-2.5.5 # Example for php v7.x pecl install php-xdebug pecl clear-cache ``` * **Edit your `ext-xdebug.ini`** * Your `ext-xdebug.ini` file path should look like this - `/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini` * Add these lines by overwriting exiting ``` ;zend_extension="/usr/local/Cellar/[email protected]/7.1.19/pecl/20160303/xdebug.so" zend_extension="xdebug.so" xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM xdebug.show_error_trace = 1 xdebug.remote_autostart = 0 xdebug.file_link_format = phpstorm://open?%f:%l ``` * **Update your `php.ini`** * When installing xdebug extension using `pecl`, it also updates our `php.ini` file, but we don't need that. * Find your `php.ini` file, file path should look like this - `/usr/local/etc/php/7.1/php.ini` * Remove any occurrence of `zend_extension="xdebug.so"` from this file * Above configs are bare minimum, read all options [here](https://xdebug.org/docs/all_settings) * Restart the apache server to reflect changes ``` sudo apachectl -k restart ``` * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `xdebug.ini`. In our case it was `9000`. * Save and close the Settings Dialog * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your virtual host in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * In your browser access your project url like this ``` http://localdomain.test/?XDEBUG_SESSION_START=1 ``` * OR use [bookmarks](https://www.jetbrains.com/phpstorm/marklets/) * OR use [chrome extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,96 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm php debug settings * Set `xdebug.remote_autostart` to `1` if you don't want to bother with browser extensions ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) * [jetBrains](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html) * [Laracasts](https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20) * [xDebug in phpStorm with Screenshots](https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm) * [Laravel Valet](https://pixelfear.com/blog/xdebug-laravel-valet-phpstorm-composer) * [getGrav Tutorial](https://getgrav.org/blog/macos-sierra-apache-mysql-vhost-apc) * [xDebug options](https://xdebug.org/docs/all_settings) #### Not a big fan of phpStorm? * [Sublime Text 3](https://packagecontrol.io/packages/Xdebug%20Client) * [Visual Studio Code](https://github.com/felixfbecker/vscode-php-debug) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,65 @@ ## :beetle: Install and Configure xDebug on Ubuntu and PhpStorm :elephant: * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** ``` # Ubuntu 16.04,18.04 php 7.x sudo apt-get install php-xdebug # Ubuntu 14.04, php 5.6 sudo apt-get install php5-xdebug ``` * **Edit your `xdebug.ini`** * Your `xdebug.ini` file path should look like this - `/etc/php/7.1/mods-available/xdebug.ini` * Add these lines without modifying exiting ``` xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM xdebug.show_error_trace = 1 xdebug.remote_autostart = 0 xdebug.file_link_format = phpstorm://open?%f:%l ``` * Restart the apache server to reflect changes ``` sudo service apache2 restart ``` * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `xdebug.ini`. In our case it was `9000`. * Save and close the Settings Dialog * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your virtual host in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * In your browser access your project url like this ``` http://localdomain.test/?XDEBUG_SESSION_START=1 ``` * OR use [bookmarks](https://www.jetbrains.com/phpstorm/marklets/) * OR use [chrome extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! ----- ### Disable xdebug ``` sudo phpdismod xdebug ``` ### Enable xdebug back ``` sudo phpenmod xdebug ``` ### Disable xdebug for commandline only ``` sudo phpdismod -s cli xdebug ``` -
ankurk91 revised this gist
Apr 28, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,8 @@ sudo apt-get install php5-xdebug brew install php72-xdebug ``` :warning: [Homebrew](https://brew.sh/2018/04/09/homebrew-1.6.0/) v1.6 has changed the way to install php extensions. This tutorial does not cover this yet. * **Edit your `xdebug.ini`** * Your `xdebug.ini` paths should look like this - Ubuntu `/etc/php/7.1/mods-available/xdebug.ini` -
ankurk91 revised this gist
Apr 17, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -86,7 +86,7 @@ sudo phpdismod -s cli xdebug * [Laracasts](https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20) * [xDebug in phpStorm with Screenshots](https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm) * [Laravel Valet](https://pixelfear.com/blog/xdebug-laravel-valet-phpstorm-composer) * [getGrav Tutorial](https://getgrav.org/blog/macos-sierra-apache-mysql-vhost-apc) #### Not a big fan of phpStorm? * [Sublime Text 3](https://packagecontrol.io/packages/Xdebug%20Client) -
ankurk91 revised this gist
Feb 24, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -78,13 +78,14 @@ sudo phpdismod -s cli xdebug ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm php debug settings * Set `xdebug.remote_autostart` to `1` if you don't want to bother with browser extensions ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) * [jetBrains](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html) * [Laracasts](https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20) * [xDebug in phpStorm with Screenshots](https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm) * [Laravel Valet](https://pixelfear.com/blog/xdebug-laravel-valet-phpstorm-composer) #### Not a big fan of phpStorm? -
ankurk91 revised this gist
Feb 24, 2018 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -75,10 +75,6 @@ sudo phpenmod xdebug sudo phpdismod -s cli xdebug ``` ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm php debug settings @@ -87,4 +83,11 @@ sudo phpdismod -s cli xdebug ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) * [jetBrains](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html) * [Laracasts](https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20) * [xDebug in phpStorm with Screenshots](https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm) #### Not a big fan of phpStorm? * [Sublime Text 3](https://packagecontrol.io/packages/Xdebug%20Client) * [Visual Studio Code](https://github.com/felixfbecker/vscode-php-debug) -
ankurk91 revised this gist
Feb 23, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -81,8 +81,8 @@ sudo phpdismod -s cli xdebug ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm php debug settings * Set `xdebug.remote_autostart` to `1` if you don't want bother with browser extensions ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) -
ankurk91 revised this gist
Feb 23, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,7 @@ xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM xdebug.show_error_trace = 1 xdebug.remote_autostart = 0 xdebug.file_link_format = phpstorm://open?%f:%l ``` @@ -81,6 +82,7 @@ sudo phpdismod -s cli xdebug ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm * Set `xdebug.remote_autostart` to `1` if you want bother with browser extensions ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) -
ankurk91 revised this gist
Feb 23, 2018 . 1 changed file with 15 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,27 +11,26 @@ sudo apt-get install php5-xdebug # Mac OS with Homebrew # brew install php<version>-xdebug # Example for php v7.2 brew install php72-xdebug ``` * **Edit your `xdebug.ini`** * Your `xdebug.ini` paths should look like this - Ubuntu `/etc/php/7.1/mods-available/xdebug.ini` - macOS `/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini` * You can run ``locate *xdebug.ini`` to find `xdebug.ini` file location * Add these lines without modifying exiting lines ``` xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM xdebug.show_error_trace = 1 xdebug.file_link_format = phpstorm://open?%f:%l ``` * Above configs are bare minimum, read all options [here](https://xdebug.org/docs/all_settings) * Restart the apache server to reflect changes ``` # Ubuntu sudo service apache2 restart @@ -42,15 +41,15 @@ sudo apachectl restart * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `xdebug.ini`. In our case it was `9000`. * Save and close the Settings Dialog * **Start debugging** * Create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure those breakpoints gets executed when your visit your virtual host in browser. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections * In your browser access your project url like this ``` http://localdomain.test/?XDEBUG_SESSION_START=1 ``` @@ -79,6 +78,10 @@ sudo phpdismod -s cli xdebug * [Sublime Text 3](https://packagecontrol.io/packages/Xdebug%20Client) * [Visual Studio Code](https://github.com/felixfbecker/vscode-php-debug) ### Troubleshooting * Try to change the port to something else, for example `18000` * Enable `Break at first line` in phpStorm ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) * [jetBrains](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html) -
ankurk91 revised this gist
Feb 18, 2018 . 1 changed file with 19 additions and 36 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,65 +15,48 @@ sudo apt-get install php5-xdebug brew install php71-xdebug ``` * **Edit your `xdebug.ini`** * Your `xdebug.ini` paths should look like this - Ubuntu `/etc/php/7.1/mods-available/xdebug.ini` - macOS `/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini` * You can run ``locate *xdebug.ini`` to find `xdebug.ini` file location * Add these lines without modifying exiting ``` xdebug.remote_enable = 1 xdebug.show_error_trace = 1 xdebug.remote_port = 9001 xdebug.idekey = PHPSTORM xdebug.max_nesting_level = 512 xdebug.file_link_format = phpstorm://open?%f:%l ``` * Above configs are bare minimum, read all options [here](https://xdebug.org/docs/all_settings) * Restart apache server to reflect changes ``` # Ubuntu sudo service apache2 restart # MacOS sudo apachectl restart ``` * **Configure phpStorm** * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your `xdebug.ini`. In our case it was `9001`. * Save and close the Settings Dialog * **Start debugging** * In PhpStorm create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure breakpoints gets executed when your visit your virtual host. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run >> Start listening for PHP Debug connections * In your browser access your project like this ``` http://localdomain.test/?XDEBUG_SESSION_START=1 ``` * OR use [bookmarks](https://www.jetbrains.com/phpstorm/marklets/) * OR use [this](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) chrome extension * You should see a popup window in PhpStorm , click **Accept** connection * Done, enjoy debugging !!! -
ankurk91 revised this gist
Jan 21, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,11 +15,11 @@ sudo apt-get install php5-xdebug brew install php71-xdebug ``` * Now edit your ```php.ini``` (for me it was ```/etc/php/7.1/apache2/php.ini```) and add these lines at last * You can run ``locate php.ini`` to find `php.ini` file location ``` [Xdebug] zend_extension="/usr/lib/php/20160303/xdebug.so" xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM -
ankurk91 revised this gist
Jan 20, 2018 . 1 changed file with 11 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,8 +11,8 @@ sudo apt-get install php5-xdebug # Mac OS with Homebrew # brew install php<version>-xdebug # Example for php v7.1 brew install php71-xdebug ``` * Now edit your ```php.ini``` (for me it was ```/etc/php/7.0/apache2/php.ini```) and add these lines at last @@ -40,11 +40,11 @@ php --version ``` * Above command should return like this ``` PHP 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Dec 14 2017 15:37:13) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.12-3+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans ``` * Notice the Xdebug version in last line * Restart apache server to reflect changes @@ -62,7 +62,7 @@ sudo apachectl restart * Save and close this window * Now, on the Settings window; select the Interpreter you just created * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that 'Debug port' is the same you have in your php.ini. In our case it is `9000`. * Save and close the Settings Dialog * **Start debuging** @@ -87,13 +87,14 @@ sudo phpdismod xdebug ``` sudo phpenmod xdebug ``` ### Disable xdebug for commandline only (Ubuntu) ``` sudo phpdismod -s cli xdebug ``` #### Not a big fan of phpStorm? * [Sublime Text 3](https://packagecontrol.io/packages/Xdebug%20Client) * [Visual Studio Code](https://github.com/felixfbecker/vscode-php-debug) ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) -
ankurk91 revised this gist
Jan 19, 2018 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,11 +60,14 @@ sudo apachectl restart * Lets set php Interpreter, to do so; click on three dots [...] button * On the new window; click on plus [+] button and select ```/usr/bin/php``` from suggestion popup * Save and close this window * Now, on the Settings window; select the Interpreter you just created * Go through - Settings >> Languages & Frameworks >> PHP >> Debug * Check that Debug port is the same you have in your php.ini. In our case it is `9000`. * Save and close the Settings Dialog * **Start debuging** * In PhpStorm create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Make sure breakpoints gets executed when your browser your website. * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run >> Start listening for PHP Debug connections * In your browser access your project like this, OR use [bookmarks](https://www.jetbrains.com/phpstorm/marklets/) OR use [this](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) chrome extension -
ankurk91 revised this gist
Nov 18, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -84,7 +84,7 @@ sudo phpdismod xdebug ``` sudo phpenmod xdebug ``` ### Disable xdebug for commandline only ``` sudo phpdismod -s cli xdebug ``` -
ankurk91 revised this gist
Nov 11, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -84,7 +84,7 @@ sudo phpdismod xdebug ``` sudo phpenmod xdebug ``` ### Disable xdebug fro commandline only ``` sudo phpdismod -s cli xdebug ``` -
ankurk91 revised this gist
Oct 5, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -84,6 +84,10 @@ sudo phpdismod xdebug ``` sudo phpenmod xdebug ``` ### Disable xdebug from commandline only ``` sudo phpdismod -s cli xdebug ``` #### Sublime Text 3 user ? * Try this [package](https://packagecontrol.io/packages/Xdebug%20Client) -
ankurk91 revised this gist
Aug 12, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -88,3 +88,7 @@ sudo phpenmod xdebug #### Sublime Text 3 user ? * Try this [package](https://packagecontrol.io/packages/Xdebug%20Client) ### Resources * [Laravel News](https://laravel-news.com/xdebug-phpstorm-valet) * [jetBrains](https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html) * [Laracasts](https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20) -
ankurk91 renamed this gist
Aug 3, 2017 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## :beetle: Install and Configure xDebug on Ubuntu/Mac and PhpStorm :elephant: * Assuming that you have already installed php and apache * **Install [xDebug](https://xdebug.org/docs/install) php extension** @@ -11,12 +11,12 @@ sudo apt-get install php5-xdebug # Mac OS with Homebrew # brew install php<version>-xdebug # Example for php v5.6 brew install php56-xdebug ``` * Now edit your ```php.ini``` (for me it was ```/etc/php/7.0/apache2/php.ini```) and add these lines at last * You can run ``locate php.ini`` to find `php.ini` file location ``` [Xdebug] zend_extension="/usr/lib/php/20151012/xdebug.so" @@ -32,7 +32,7 @@ xdebug.file_link_format = phpstorm://open?%f:%l ``` locate xdebug.so ``` * Above command will return the correct path to `xdebug.so` file * Now check php version ``` @@ -66,6 +66,7 @@ sudo apachectl restart * **Start debuging** * In PhpStorm create some [breakpoints](https://www.jetbrains.com/help/phpstorm/breakpoints-2.html) in your project * Start listener by clicking on the telephone :telephone_receiver: button on top toolbar * If you can't find telephone button; then go through menus - Run >> Start listening for PHP Debug connections * In your browser access your project like this, OR use [bookmarks](https://www.jetbrains.com/phpstorm/marklets/) OR use [this](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) chrome extension ``` http://localdomain.dev/?XDEBUG_SESSION_START=1 @@ -75,11 +76,11 @@ http://localdomain.dev/?XDEBUG_SESSION_START=1 ----- ### Disable xdebug (Ubuntu) ``` sudo phpdismod xdebug ``` ### Enable xdebug back (Ubuntu) ``` sudo phpenmod xdebug ``` -
ankurk91 revised this gist
Jul 22, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -87,4 +87,3 @@ sudo phpenmod xdebug #### Sublime Text 3 user ? * Try this [package](https://packagecontrol.io/packages/Xdebug%20Client)
NewerOlder