Setting up debugging in an IDEÂ with a local PHP development environment has gotten so easy it can be done in a coupleÂ automated steps. In this post I will demonstrate how to get step debugging functioning with Zend Studio and Zend Debugger when the server is set up on a local environment.
To begin with, I had the following:
- Local installation of Zend Server 8.5.+ (basic LAMP stack, but with Zend Debugger included in the Zend Server installation). Alternatively I could have had a vanilla LAMP environment with Xdebug.
- Ensure that Z-Ray is active in the Zend Server settings.
- A local project set up on Zend Studio, without the server set up in the Zend StudioÂ project configuration. (in this example I have a Zend Expressive Skeleton ready)
- The local project set up as an Apache virtualhost.
Ensure Zend Studio is runningÂ with the project we will debug open.
In a browser with the application rendered I click the debug icon in the Z-Ray toolbar at the foot of the window, and select the desired debugging action.
This will cause Zend Studio to prompt if we desire to use the Debug Perspective after it receives the debug connection from Zend Debugger. In most cases we can simply click YesÂ and let things happen normally.
That’s about it, we are debugging!
This was a very simplistic local development environment setup. We didn’t have a firewall to contend with, and the server was set up locally rather than insideÂ a virtual machine. I have other posts, linked below, to help with some of these alternative setups.
Other posts on Debugging you may find helpful: