Working with the Debugger
The that is included in Zend Server for IBMi
is a remote debugging tool for developers who work with .
Note:
To run remote debug
sessions using Zend Studio, the Debugger component needs to be turned on. For more information, see .
From the Zend Server for IBMi
perspective, other than defining allowed hosts and denied hosts, no additional
interaction is required.
Defining Allowed Hosts
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.
|
|
|
To define allowed hosts for debugging:
-
In the UI, go to Configurations
| Components.
- From the Components list, select the Zend Debugger.
The component directives are displayed in the Expanded View.
-
Locate the zend_debugger.allow_hosts directive, and 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.
- In the Action bar, click
.
-
In the toolbar, the restart icon lights up , indicating a restart is needed to apply changes. Click to restart server and apply changes. For information on restarting in Zend Server, see Server Restart.
|
The
IP or range of IPs is allowed to connect to the server to debug
PHP code with Zend Studio.
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 (In Window
| Preferences | PHP | Debug | Installed Debuggers, verify
that Zend Debugger is selected and click Configure
in the Client Host/IP field.)
|
Defining Denied Hosts
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.
|
|
|
To define denied hosts for debugging:
-
In the UI, go to Configurations
| Components.
- From the Components list, select the Zend Debugger.
The component directives are displayed in the Expanded View.
-
Locate the zend_debugger.deny_hosts directive, and enter a valid IP address or use Wildcards
(*) to specify a range of IPs.
- In the Action bar, click
.
-
In the toolbar, the restart icon lights up , indicating a restart is needed to apply changes. Click to restart server and apply changes. For information on restarting in Zend Server, see Server Restart.
|
The
IP or range of IPs is denied permission to connect to the server
to debug PHP code with Zend Studio.
|
Important:
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 for IBMi
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 .
Debug Mode
Debug Mode allows you to listen in on URL requests to a specific Zend Server, without initializing a debug session from a browser using the Zend Debugger Toolbar or from within Zend Studio. When Debug Mode is enabled for a server, all requests matching URL filters associated with a particular target trigger a debug session in Zend Studio. Debug Mode is especially useful when your circumstances do not allow you to set debug parameters in a request, for example, when using a mobile device.
In the UI, go to the Administration | Servers page, and under the Debug Mode column check whether your server/s is/are in Debug Mode.
For more information on using Debug Mode, see the Zend Studio Online Help.