IDE

How to debug local web php application running on LAMPP localserver.

 

eclipse ide lampp with деббагеры and Вебдизайн|lower


IDE tips

USE ECLIPSE TO DEBUG PHP ON LAMPP UBUNTU

  1. I've installed eclipse from snap store

  2. Add user to www-data group: $ sudo adduser <user-name> www-data // It is not mandatory step

  3. I need to install Xdebug // $ sudo apt-get install php-xdebug

  4. Edit file /etc/php/7.4/apache2/php.ini add text:

    [Xdebug]

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9000
  1. Open Eclipse→windows→preferences→PHP // But I have no PHP

  2. I’ve installed all PHP staff from Help->install.

  3. Then you have to set some parameters that I don’t have // I pass this, maybe it is ok

  4. Create new PHP project // I got an error “Creation element failed. Java.lang.StringBuffer...”

  5. Maybe I need to install java $ sudo apt install default-jre // It was installed

  6. Click BUG arrow sign→debug configuration →PHP web aplication →new

  7. Debug doesn’t work // Window→preference→PHP→Servers→edit→debugger

  8. Add to the file $ sudo gedit /etc/php/7.4/apache2/php.ini add text:

    [Xdebug]

    zend_extension=xdebug.so
    xdebug.remote_enable=1
    xdebug.remote_handler = dbgp
    xdebug.remote_port=9000
  9. Try to start with root $ sudo eclipse
  10. Install package PHP development tools PDT from help→Install→testing
  11. I still get error “Creation element failed. Java.lang.StringBuffer..”
  12. I will reinstall Eclipse. Go to webpage eclipse org  and find package eclipse for php developers
  13. Unpack $ tar -xvzf <name of archive>
  14. Run $ ./eclipse
  15. Debug→Configuration→PHP CLI  //  I need to set PHP executable path 
  16. run $ which php  // In my case /usr/bin/php7.4
  17. I need to install directory on start with my apache directory /var/www/html and start from root $ sudo ./eclipse
  18. Eclipse seems to be doesn’t see php-xdebug
  19. Problem is “Running Firefox as root in a regular user's session is not supported.” // So it was mistake to use $ sudo ./eclipse  
  20. Change owner of server directory $ sudo chown -R john html
  21. VICTORY!
  22. I want to change a default web browser in Eclipse debug tool to test other browser. //Preferences→General→Web-Browser→New

  23. Eclipse PyDev python I get an error Mixed Indentation: Spaces found // window > preferences > PyDev > Editor, uncheck 'replace tabs with spaces when typing?'

    27.1. Copy space from “healthy” piece of code with CTRL+C then past this space with CTRL+V

 

 

PyCharm

1. Download community edition pycharm from website www.jetbrains.com and extract. Start from bin folder $ ./pycharm.sh

2. How to update virtual enviroment for a project.

2.1. Try to create new interpreter. Choose file from venv/bin/python

3. Pycharm plugin for Eclipse saddenly stopped to work correctly. It takes too much RAM and doesn't run debugging. Maybe it is because I installed new python version? I will try to install stand alone Pycharm from snap store.