Zend Server's integration with PhpStorm allows you to easily debug your applications and quickly identify those weak spots in your code. Using Z-Ray, you can directly debug or profile your applications in PhpStorm, allowing you to see how your code is running as you develop it, and empowering you to deliver higher-quality code faster.
In this tutorial you will learn:
Download and install Zend Server 8.x or above from the Zend Server Downloads page . For detailed installation instructions, see the Zend Server Installation Guide: DEB / RPM / SLES / Mac OS X / Windows
Download and install PhpStorm Early Access version from JetBrains.
To better understand the procedures described in this topic, watch this video:
Our first step is to create a new project in PhpStorm from the existing WordPress files we installed on the root directory of our Web server.
|
|
|
To create a new project in PhpStorm:
|
Can't see Z-Ray? Make sure Z-Ray is enabled from the Configurations | Z-Ray page in the Zend Server UI. For more information, see Enabling/Disabling Z-Ray. If you still can’t see Z-Ray, there may be a connectivity issue. For more information, see Troubleshooting Connectivity Issues. |
Before we begin debugging, we need to make sure PhpStorm is configured correctly for integration with Zend Server. In most cases, the default configurations in PhpStorm will suffice and no further action is required.
|
|
|
To configure PhpStorm:
|
|
We're now going to insert some faulty code to simulate errors in our application, and then initiate a debugging session in PhpStorm from Z-Ray.
This step includes the example code for simulating errors in the WordPress application.
|
|
|
To insert example code:
|
|
|
|
|
To debug/profile your from Z-Ray:
|
|