Working with the Debugger

The Debugger API that is included in Zend Server is a remote debugging tool for developers who work with Zend Studio. If the Debugger Component is not set to "On" in the Components page, you are not able to run remote debug sessions using Zend Studio. For more information on turning the Debugger Component to "On", see Working with Components.

From the Zend Server perspective, other than defining allowed hosts and denied hosts, no additional interaction is required.

 

The following procedure describes how to define allowed hosts for debugging. Users define allowed hosts to create a list of IP addresses (of computers that run Zend Studio) that have permission to debug the PHP code that runs on the server.

 

 

Instructions on how to complete a procedure

To define allowed hosts for debugging:

  1. In the Administration Interface go to Server Setup | Debugger.

  2. In the "Allowed Zend Studio Clients for Debugging" section, enter a valid IP address or enter a range by entering the beginning of an IP address and adding '0' instead of the rest of the number. To make sure you are using Wildcards (*) to specify a range of IPs select the pattern you want from the drop-down list.

  3. From the drop-down list, select an option according to the type of IP address you entered. Click 'Exact IP address only' for a single IP, or one of the other options to represent a range of hosts.

  4. Click add_pe.png to add the Host.

  5. The changes are applied after you restart the Server Restart Server

The IP or range of IPs is allowed to connect to the server to debug PHP code with Zend Studio.

To remove a specific IP from the list, click "Remove".

Important Note:

If your machine has several IP addresses (for example if you are using a wireless network connection on a laptop) verify that you have defined all the possible IP addresses as "Allowed Hosts for Debugging" or that the IP you want to use is first in the list of IPs in Zend Studio for Eclipse. (In Window | Preferences | PHP | Debug | Installed Debuggers, verify that Zend Debugger is selected and click Configure in the Client Host/IP field.)

 

The following procedure describes how to define denied hosts for debugging. Users define denied hosts to create a list of IP addresses (of computers that run Zend Studio) that do not have permission to debug the PHP code that runs on this server.

 

 

Instructions on how to complete a procedure

To define denied hosts for debugging:

  1. In the Administration Interface go to Server Setup | Debugger.

  2. In the "Denied Zend Studio Clients for Debugging" section, enter a valid IP address or use Wildcards (*) to specify a range of IPs.  

  3. From the drop-down list, select an option according to the type of IP address you entered. Click 'Exact IP address only' for a single IP, or one of the other options to represent a range of hosts.

  4. Click add_pe.png to add the host.

  5. The changes are applied after you restart the Server Restart Server .

The IP or range of IPs is denied permission to connect to the server to debug PHP code with Zend Studio.

To remove a specific IP from the list, click "Remove".

Note:

Do not add the same IP address to both the Allowed and Denied host lists. Pay attention when you specify a range of IP addresses: If you deny a range of addresses that includes an IP that was specified in the Allowed hosts, the host is not allowed to create a debug session.

Wildcards (Net Mask)

Wildcards use the asterisk (*) to define a string of IP addresses and to specify a range of IPs that are either allowed or denied hosts. This option makes it possible to specify a range of IPs from 0-255, according to the selected number of wildcards. For example, if you use the Net Mask option to deny the IPs 10.1.3. *, all the IP addresses beginning with 10.1.3. are denied access to the Studio Server (i.e., integration with Studio is not permitted for these IP addresses).

Remote Debugging Through a Firewall?

Remote debugging is the process of creating a connection between two machines: For example, the machine on which the Debugger (Zend Studio) resides and the machine on which the Zend Server resides. When these machines are on the same local network or there are no security devices that limit remote connections, no additional action is required. However, if one or both of the machines are behind a firewall, the communication required to run the debug process is not allowed. To allow debugging and still maintain a secure environment, you need to use firewall tunneling. For more information on how to setup firewall tunneling, see Working with Firewall Tunneling.

 

 

Related Links

Related Links:

Debugger Access Control

Working with Firewall Tunneling

Zend Debugger - Configuration Directives

Configuring Debugger Access Control