473,943 Members | 20,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugging PHP

Hi All,
I've just started writing PHP scripts. I was wondering whether there was
any sensible debugging facilities that I'm not aware of. Basically, my usual
development procedure involves writing the script and then testing using IE.
However, it appears that unless the PHP is perfect (ie. devoid of any
syntactical errors) then nothing at all is output to the browser. Personally
I find this very frustrating as there's no clue as to where the error is. I
then commence on a wild goose chase putting in various debugging 'echo'
statements and commenting out various chunks of PHP code until something
works. There must be a better approach than this.

Are there any option or selections I can make to give me some debugging
output?. Is there a parser I can use to ensure there are no syntactical
errors before running the script?. Or a PHP debugger I can use to step
through the code command by command?.

Thanks,
Dave

Jul 17 '05
12 1711
Dave Moore wrote:
Are there any option or selections I can make to give me some debugging output?. Is there a parser I can use to ensure there are no syntactical errors before running the script?. Or a PHP debugger I can use to step through the code command by command?.


I evaluated NuSphere phped and Zend Studio last year. They both do have
debugging support, but I like phped better. Generally, it's better and
more responsitive while Zend Studio is slow and resource hog. I
purchased phped then and it helps me to write better code.

Both are nice products however, you may want to try them on your
project.

-Erich

Jul 17 '05 #11
Sorry for the late reply.

No unfortunately I do not. I can however tell you that Zend is probably
your best bet as they an inherit better understanding of the Zend
Engine (2), which is a core part of PHP. Because of this fact, I trust
it to be more "up to date" and better supported in terms of future PHP
(I'm a bleeding edge kind of guy, so that might not be the case with
you).

Prices are about the same, I think Zend might provide support longer
support for you though, it's been a while since I checked the pricing
charts though. Well I take that back, I don't really remember as my
company bought the license on my behalf, all I know is that I have had
complimentary product updates thus far. ;-)

The debugger I can compare Zend Studio to is MS Visual Studio, in that
they basically have the same features and interaction (right down to
the shortcut keys if you select the MS VS keyboard layout option).

However, I did run into some trivial problems with getting things
working at home with the debugger, due to my router and some drive
mapping, but at the end I got it working just as I'd like...plus the
Firefox toolbar just seals the deal for me :-)

Zend Enhanced support is really reliable and some of the most
knowledgable people I have worked with in support. I've heard good
things about eclipse from fellow programmers at work, but I couldn't
even get it to start up on my machine so I can't comment personally.

Jul 17 '05 #12
Chung Leong <ch***********@ hotmail.com> wrote:
That won't help when there's a parse error. The solution here is to
make sure display_error is set to "on" in php.ini and error_reporting
to something sensible, like E_ALL & ~E_NOTICE.


if you're looking to debug your scripts i strongly advise you to
download Komodo personal, search on the internet, and get a premotion
code and a free copy, works with the dbg debugger and is flawless for me.
Jul 17 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3238
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
16
4239
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the project in debug mode (by hitting F5) it gives an error message "Error while trying to run project: Unable to start debugging on the web server.
2
1863
by: Andy Fish | last post by:
Hi, Using VS.NET 2003, when I use 'F5' to start debugging my web app, it obviously attaches the IDE to IIS for server debugging. However, it also seems to put IE into some kind of debugging mode (for javascript debugging) This causes IE to consume loads of CPU if the page is very large. Is there any way to have debugging of server side code but leave IE in "normal" mode?
2
3285
by: Alex Clark | last post by:
Hi All, My system: WinXP Pro, VS.NET 2003, SQL Server Personal Edition. I'm having problems with my old favourite demon, SQL Debugging from within VS.NET. I have to say I've found this particular feature to be one of the most useful and (sadly) unreliable/fragile features in VS.NET, it seems the slightest thing will break it.
5
2967
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The final, never installed beta) installed on this box if it makes a difference (I did not install VS Development Web Server as I'm already using the XP web server). I've seen that I need to attach to the native IIS engine, but I don't know what it's...
6
2518
by: KevinGPO | last post by:
I am currently developing a website in ASP (VBScript) using MS Visual C#.NET IDE. I just create a new "ASP.NET Web Application" and point to my local webserver (IIS) of my website address. Then I just go through each file/folder and right-click, selecting "Include in project". The IDE is nice in that it checks, verifies id tags, etc. What am wondering is whether it's possible to debug my ASP website using the MS Visual Studio.NET's...
5
7812
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an app.config file referencing arbitrary versions of the plug-in components they wish to consume. Here's the problem: Assuming I have installed any one of our application software,
5
3462
by: =?Utf-8?B?Z2FkeWE=?= | last post by:
I can't get to debug on my local IIS using VStudio.net 2005 Prof. I can on the development server. I get the msg 'the server does not support debugging for asp.net...' I have done the following as in 'How to: Enable Debugging for ASP.NET Applications' Under Debuggers ASP.NET box is selected in web.config set compilation debug="true" in virtual directory:
2
20878
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use some of the tools provided on the command-line. If you hate the command line tools, get over it since you’re bound to be using them at some point in your career. All commands in Linux ARE case sensitive so capital letters are different from lowercase...
4
12709
by: =?Utf-8?B?TWlrZSBHYWxl?= | last post by:
VS 2008 initially didn't debug classic ASP. SP1 fixes this in some ways. You can debug if you select the debug option to "Start Without Debugging, then either attach the debugger manually or place a stop directive in the code which ends up doing the same thing. The problem with this is that you can't debug browser side Javascript in the same debug run. You get a "The breakpoint will not currently be hit. The document is not loaded." if...
0
11534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9865
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8219
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6308
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4910
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.