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 trial

PHP Laravel 4 Basics Getting Started with Laravel Installing Laravel

Frans Teja
Frans Teja
8,175 Points

How 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
Chris McKnight
11,045 Points

You 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:

  1. Disable XDebug completely and forget about it (not recommended, I find XDebug handy while debugging of course)
  2. See if you OS has a cli php.ini file and comment out or remove the zend_extension = "/path/to/my/xdebug.so" line
  3. 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.

Frans Teja
Frans Teja
8,175 Points

Thanks for the answer Chris :)

Antonio De Rose
Antonio De Rose
20,885 Points

Hi,

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