How to debug local web php application running on LAMPP localserver.
I've installed eclipse from snap store
Add user to www-data group: $ sudo adduser <user-name> www-data // It is not mandatory step
I need to install Xdebug // $ sudo apt-get install php-xdebug
Edit file /etc/php/7.4/apache2/php.ini add text:
[Xdebug]
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9000
Open Eclipse→windows→preferences→PHP // But I have no PHP
I’ve installed all PHP staff from Help->install.
Then you have to set some parameters that I don’t have // I pass this, maybe it is ok
Create new PHP project // I got an error “Creation element failed. Java.lang.StringBuffer...”
Maybe I need to install java $
sudo apt install default-jre
//
It
was installed
Click BUG arrow sign→debug configuration →PHP web aplication →new
Debug doesn’t work // Window→preference→PHP→Servers→edit→debugger
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
Try to start with root $ sudo eclipse
Install package PHP development tools PDT from help→Install→testing
I still get error “Creation element failed. Java.lang.StringBuffer..”
I will reinstall Eclipse. Go to webpage eclipse org and find package eclipse for php developers
Unpack $ tar -xvzf <name of archive>
Run $ ./eclipse
Debug→Configuration→PHP CLI // I need to set PHP executable path
run $ which php // In my case /usr/bin/php7.4
I need to install directory on start with my apache directory /var/www/html and start from root $ sudo ./eclipse
Eclipse seems to be doesn’t see php-xdebug
Problem is “Running Firefox as root in a regular user's session is not supported.” // So it was mistake to use $ sudo ./eclipse
Change owner of server directory $ sudo chown -R john html
VICTORY!
I want to change a default web browser in Eclipse debug tool to test other browser. //Preferences→General→Web-Browser→New
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
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.