Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Debug Conceptual Question for Eclipse 2019-03(Concept Confusion)
Debug Conceptual Question for Eclipse 2019-03 [message #1816543] Wed, 30 October 2019 22:22 Go to next message
Reinhardt Christiansen is currently offline Reinhardt ChristiansenFriend
Messages: 73
Registered: March 2010
I am developing PHP code for web pages using Eclipse 2019-03.

I have never been able to figure out how to get the debugger to work for PHP; it was always very easy for Java but I'm finding the PHP debugger completely cryptic. But I'm getting tired of writing echo statements to debug my code and would save considerable time if I could just get the PHP debugger working.

Before I ask specific questions, I would appreciate some advice on a conceptual issue that I don't see discussed in any website or video that I've looked at; I can't find it in the Eclipse Help either.

Where does my code need to be when I am debugging? I can see three options:

    1. directly in Eclipse with the PHP development tools installed
    2. in a local environment like XAMPP or WAMPP
    3. on a remote server

Personally, I'd find the 1st of those options the most convenient; then I could debug without having to bother with other software and copying my code back and forth between Eclipse and wherever it is running but I don't know if that is realistic. Failing that, I'd prefer to debug directly on the server but I'm not sure if that is realistic either since my server is just space on one of the free hosting services and I'm not sure they will allow their users to debug in that environment.

My second conceptual question regards PHP debuggers. I know there are at least two, Zend and XDebug and it looks like Eclipse can accommodate both. Which is the "better" choice of debugger and why? Or are they pretty much the same in functionality and just a matter of the developer's personal preference?
Re: Debug Conceptual Question for Eclipse 2019-03 [message #1816640 is a reply to message #1816543] Sat, 02 November 2019 17:37 Go to previous message
Dawid Pakula is currently offline Dawid PakulaFriend
Messages: 290
Registered: March 2013
Senior Member
It depends how your application works. If you debugging PHP CLI script, you can start and debug it directly in Eclipse. It's simple because Eclipse will be able to configure php before start your script.

Everything become complicated when you want debug web application, because by design you need web-server, and debugger have to be installed on web-server. Eclipse become client that is able to communicate to debugger and give instructions. Due this you need source code in eclipse and on sever. Easies way is local web server with correctly configured Xdebug ( or Zend Debugger, that point to same location as your project. Since PHP5.4 if you correctly configure debugger, you can use built-in php web server.

Previous Topic:Is PDT Built in Eclipse IDE for Web and JavaScript Developers?
Next Topic:How to optimize build process
Goto Forum:

Current Time: Tue May 30 14:38:31 GMT 2023

Powered by FUDForum. Page generated in 0.01489 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top