Thursday, September 11, 2014

JavaScript Debug in WebStorm

To debug javascript in webstorm, we need google chrome extension After add this extension, follow the bellow step:

1. Go into 'Tool Bar' -> 'Edit Configuration' option.

2. Then Click on left most 'Plus Sign' and add 'Javascript Debug' 

           Edit the name field as you want! and then carefully add the path of your file file in the 'URL'  
Also change the 'Browser' Option into chrome.

That's all! Happy Debugging! 

Wednesday, September 03, 2014

Install xdebug for PHP5

I am going to install xdebug, please follow the bellow instruction:

1. Run this command in terminal:
          sudo pecl install xdebug

if you face problem like:
     
      Download of "pecl/xdebug" succeeded, but it is not a valid package archive
      Error: cannot download "pecl/xdebug"



Then try by the bellow command:
                   sudo pecl install -Z xdebug

2. After the command execution end, the build process complete with this command and you will see message in the terminal like bellow:

Build process completed successfully
Installing '/usr/lib/php5/20121212+lfs/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.2.5
configuration option "php_ini" is not set to php.ini location
You should add "zend_extension=xdebug.so" to php.ini


3. Then edit php.ini by the following command:

       sudo gedit /etc/php/apache2/php.ini

    and append like  bellow:

   zend_extension = /usr/lib/php5/20121212+lfs/xdebug.so

4. Then restart apache by the bellow command:

   sudo service apache2 restart


Or you may follow the xdebug wizard instruction:

                   http://www.xdebug.org/wizard.php