Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialFrans Teja
8,175 PointsHow to turn off XDebug?
My mac works slow after I typed "vagrant ssh" inside the terminal. Then I typed a line of code just like what exactly you said which is "composer". There's a sort of bonus message, "You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug".
And I want to turn off xDebug, which.. I don't know how.
2 Answers
Chris McKnight
11,045 PointsYou can disable it in your php.ini file. Some OSes have a cli version of php.ini which is loaded for the command line. Other OSes have a php.ini that is loaded for web servers such as apache.
You have a few options:
- Disable XDebug completely and forget about it (not recommended, I find XDebug handy while debugging of course)
- See if you OS has a cli php.ini file and comment out or remove the
zend_extension = "/path/to/my/xdebug.so"
line - Disable XDebug completely, create some command line aliases which re-enable XDebug, and use
ini_set
in your web applications to use XDebug within your web applications
See the composer documentation for details on these workarounds.
Antonio De Rose
20,885 PointsHi,
I use windows, and not mac, watch out for the php.ini file, and do the same for the below.
xdebug.remote_enable = 1 xdebug.profiler_enable = off
Frans Teja
8,175 PointsFrans Teja
8,175 PointsThanks for the answer Chris :)