- Download/clone repo.
- Copy the folder Lastra/ to your app/code/ directory in Magento.
- Replace code in View Model according to your needs.
- In your Magento root directory run:
sudo rm -rf generated/*; magento mod:en Lastra_Testing magento c:c
- Turn on your debug tool.
- Add breakpoints.
- Add /in_a_galaxy/far/faraway to your browser, after your localhost url.
As root and use bash:
mkdir /tmp/downloads; \
wget -O /tmp/downloads/xdebug-2.6.1.tgz https://xdebug.org/files/xdebug-2.6.1.tgz; \
cd /tmp/downloads; \
tar -xvzf /tmp/downloads/xdebug-2.6.1.tgz; \
cd /tmp/downloads/xdebug-2.6.1; \
phpize; \
./configure && make; \
cp /tmp/downloads/xdebug-2.6.1/modules/xdebug.so /usr/lib/php/20170718/; \
rm -r /tmp/downloads;
apt-get install php-xdebug;
In file /etc/php/7.2/mods-available/xdebug.ini insert:
zend_extension = /usr/lib/php/20170718/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.ide_key = PHPSTORM
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.remote_connect_back = 1