do I need to setup a server in my computer in order to debug PHP code using Zend debugger ?

StackOverflow https://stackoverflow.com/questions/18030676

  •  23-06-2022
  •  | 
  •  

I have Eclipse PDT and Zend debugger installed and I want to test my php code before uploading it into a remote server. My code needs to read some values in the remote files I don't know how configure PHP debugger in Eclipse for that case. Then I tried to test it locally but I think I have to setup a server in my computer, am I right?. By the way, Eclipse offers me to create servers by downloading server adapters, and there are several options. I'm really confused. What do you think about Chrome extension for debugging php ? is it a quick solution?

有帮助吗?

解决方案

I want to test my php code before uploading it into a remote server

In order to test your code, you write Automated Tests. That way you don't need to verify manually each time you change something. See unit, integration and system tests for PHP applications

Then I tried to test it locally but I think I have to setup a server in my computer, am I right?

No. Zend Debugger allows you to step your local code. And you can also execute the code by just running the script and check it's output. However, if you want to test by clicking through your application's UI, then you need a webserver. PHP has a built-in webserver though, which might be sufficient for that purpose. See Are there any php frameworks contain small webserver and rich console tools like RoR/Django?

On a side note, Eclipse with PDT and Zend Debugger is not Zend Studio. If you want to use Zend Studio with a local server, consider installing Zend Server Community Edition which will setup the entire PHP stack for you for out of the box usage. No fiddling with getting Zend Debugger running with XAMP. Questions about Zend Studio and Server are best asked at http://forums.zend.com btw

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top