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 trialRoger Clary
957 PointsIs there an IDE for PHP on Mac which would provide error checking and problem notification?
I'm used to working with an IDE which provides error checking. I'm frustrated with this code in a text file process as one small error produces a blank page. I then must spend a long time finding the error. Is there an error checking IDE for the Mac platform?
5 Answers
Mike Costa
Courses Plus Student 26,362 PointsI use Sublime Text 2 for coding and use the SublimeLinter plugin which gives you a little warning if there are syntax errors. For more extensive debugging, I've been using CodeBug http://codebugapp.com/ I've strayed away from IDE's and just stuck with a solid fast text editor. I used to use Coda and Eclipse and then fell in love with Sublime Text.
Alena Holligan
Treehouse TeacherAlthough I do like PHPStorm, there are three ways to show errors in php which may be what you want
1) add the following two lines directly below the top <?php (will NOT show parse errors and can still show a blank page)
error_reporting(E_ALL);
ini_set("display_errors", 1);
2) create a file in the root directory of your site named ".htaccess" within that file add the following lines (WILL show parse errors)
# display startup errors
php_flag display_startup_errors on
# display all other errors
php_flag display_errors on
# specify recording of all php errors
php_value error_reporting -1
# html markup of errors, make them easier to read
php_flag html_errors on
3) update your php.ini file to show errors (this WILL show parse errors but may be harder to locate and you don't always have access. Calling "phpinfo();" within a php file will display information about php and help you locate php.ini)
Make sure the following settings are turned on:
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
Kevin Phillips
15,693 PointsThanks for these great resources, Alena!
Jacob Herper
94,150 PointsI am using Adobe Dreamweaver for all my projects. Dreamweaver will show you errors on the line they occur.
If you are looking for a free solution, you can check out Eclipse PDT: http://www.eclipse.org/pdt/ I have personally never used it so I cannot really give you any feedback, but some of my friends work with it on a daily basis.
Roger Clary
957 PointsThanks, Jacob, for your response. Dreamweaver is really expensive for someone just getting started with PHP. I DL'ed Aptana Studio but am lost trying to get started and the documentation is not helpful. I will take a look at the eclipse plugin.
Kevin Phillips
15,693 PointsHi Roger - I use PHPStorm made by JETBrains. The beauty of this IDE is that it enables you to code in a variety of languages (html, php, JavaScript) simultaneously. It is also very well documented at their site. For instance, they have good instructions on integrating PHPStorm with MAMP.