Comments (4)
IDE might be out of scope of UF, unlike our Docker/Lando/Homestead integration. Maybe a link to an external guide could be enough.
This would be for XDebug v3, which thankfully is easier to get working.
Meh, depend on the OS... Looking at you Big Sur...
from learn.
I should have kept the setup steps on Homestead. I could add Homestead setup once you’ve done the Docker one.
from learn.
Also need to note debug is required to generate coverage report locally...
Here's some notes I have laying around:
Homestead
https://edcs.me/blog/setting-up-xdebug-with-phpstorm-and-laravel-homestead/
sudo su
apt-get install php-xdebug
nano /etc/php/7.2/fpm/conf.d/20-xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.max_nesting_level = 250
nano /etc/php/7.2/cli/conf.d/20-xdebug.ini
service php7.2-fpm restart
php -i | grep "xdebug support"
MacOS Mojave
vendor/bin/phpunit --coverage-html _meta/coverage
Error: No code coverage driver is available
https://xdebug.org/docs/install
Install Pear and Pecl :
https://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
curl -O https://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
You should now be at a prompt to configure PEAR.
- Type 1 and press return.
- Enter:
/usr/local/pear
- Type 4 and press return.
- Enter:
/usr/local/bin
- Press return
pear version
Autoconf :
curl http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz > autoconf.tar.gz
tar -xvzf autoconf.tar.gz
cd autoconf-2.69
./configure
sudo make && sudo make install
export PHP_AUTOCONF=/usr/local/bin/autoconf
Install Headers Files :
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Xdebug :
sudo pecl install xdebug
sudo mkdir -p /usr/local/php/extensions
sudo cp /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so /usr/local/php/extensions
sudo nano /etc/php.ini
[xdebug]
zend_extension=/usr/local/php/extensions/xdebug.so
xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
sudo apachectl restart
php -i | grep "xdebug support"
Atom XDebug
https://medium.com/vehikl-news/remote-php-debugging-with-xdebug-atom-and-homestead-a6db258cfa6a
Safari : https://itunes.apple.com/ca/app/safari-xdebug-toggle/id1437227804?l=fr&mt=12
Chrome : https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en
Vagrant box:
ports:
- send: 9999
to: 9000
vagrant reload --provision
vagrant ssh
sudo nano /etc/php/7.2/fpm/conf.d/20-xdebug.ini
Make sure it contains :
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
If any changes :
sudo service php7.2-fpm restart
In Atom, install php-debug
from learn.
Built in lando support coming in 4.5 simplifies things somewhat, but integrating IDEs with XDebug remains a pain point. I'm of the mind we should try and get some guides together for common IDEs (VS Code, PHPStorm) and OS (since they impact how things are setup in some circumstances).
This would be for XDebug v3, which thankfully is easier to get working.
from learn.
Related Issues (20)
- Ubuntu20 fresh install locally; from install instructions vagrant up won't work without fixing vagrant file
- Missing '-b 20.04' in Homestead installation guide HOT 5
- Inconsistent directory permission requirements HOT 3
- Mailpit install directions for Docker have moved (link to external site)
- Partial sentence HOT 1
- Forums are down HOT 2
- "Nginx" section incorrectly says "Apache" HOT 1
- Debug clarity needed in advanced tutorial HOT 1
- Feature deployment guide more prominently on website
- Update SSL docs to reflect improvements to certbot
- Migrations for existing tables HOT 2
- Add the missing CSS dependency error to Troubleshooting page HOT 1
- Missing SSH Key when trying to install via Homestead HOT 4
- UF 4.2.0 changes to migration naming convention should only include PHP files HOT 1
- Minimum npm version HOT 1
- Define what a sprinkles requires bare minimum HOT 2
- Incomplete sentance in locator HOT 3
- There's no contribution guide HOT 10
- Recipe for a New Page is missing some critical code for working correctly (19.01)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn.