Web Debugging Environment for PHP?
Sarek asks: "I work in a mostly Windows environment at work writing ASP but I much prefer PHP. While I seem to have convinced the powers that be that PHP is better, there is only one hurdle I can't seem to overcome to get them to start writing in PHP. I can't seem to find a debugging environment for PHP like there is for ASP. While I'm perfectly happy writing without it I have seen a great many benefits to having one, such as faster debugging. Has anyone thought to make one yet? And if so where can I find it? For those of you that don't know ASP uses MS InterDev. Which in short allows you to debug ASP just like you would debug a compiled language, by setting breakpoints, stepping through the code, etc..."
Yes! this is exactly what I was looking for. Now maybe I can start writing PHP more than ASP! :)
I'm not sure what you mean, but it's not just syntax highlighting. PHPEd does report errors your script - it's not too good though :) I think the first page of the PHPEd website has some screenshots of things more than syntactical errors being shown.
--Giving to trolls for the benefit of us all
One thing that is important to note is that this assumes that one is going to be using php-3.x as the debugger hasn't been ported to php 4.x yet.
To E-mail me, replace the first period in my domain with an @
Allaire's HomeSite now includes PHP syntax highlighting, and third-arty packages to do Tag "Inspection". It's not debugging by any stretch, but it does a good start!
Open Source. Closed Minds. We are Slashdot.
http://www.php.net/manual/debugger.php
Second, phpdebugger :
.sig --
http://www.phpdebug.com
--
Nexidion Designer is an Integrated Development Environment (IDE) for web development on Linux. Although Designer is great for developing traditional static HTML pages, it is particularly targeted at dynamic web sites. This preview release contains the first fully interactive PHP debugger, allowing you to set breakpoints and step through your PHP code line by line, monitoring the values of any variable or expressions. It ain't Win32, but might be something you'd like to look at.
PHP has a debugger built into it, if you check the PHP online manual, you'll see that the following directives can be set in php.ini:
Debugger Configuration Directives
debugger.host string
DNS name or IP address of host used by the debugger.
debugger.port string
Port number used by the debugger.
debugger.enabled boolean
Whether the debugger is enabled
Additionally, make sure you have the following set correctly.
display_errors boolean
This determines whether errors should be printed to the screen as part of the HTML output or not.
error_log string
Name of file where script errors should be logged. If the special value syslog is used, the errors are sent to the system logger instead. On UNIX, this means syslog(3) and on Windows NT it means the event log. The system logger is not supported on Windows 95.
error_reporting integer
Set the error reporting level. The parameter is an integer representing a bit field. Add the values of the error reporting levels you want.
Table 3-1. Error Reporting Levels
bit value enabled reporting
1 normal errors
2 normal warnings
4 parser errors
8 non-critical style-related warnings
The default value for this directive is 7 (normal errors, normal warnings and parser errors are shown).
For windows development I recommend a local instance of IIS or Apache w/ PHP (easy to setup - read the INSTALL file in the root of the win32 distribution).
A good editor is Homesite from Allaire - you can map a directory to your www server root, and when you preview pages it will get passed through the interpretor and generate error messages etc. The editor also does correct color coding for many different languages (javascript, cfml, asp, php, html, xml etc).
And here's a shoddy list of PHP editors. Shoddy, as half of them aren't PHP related.
Oh, and First Post d00dz!
--Giving to trolls for the benefit of us all