Zend Debugger GET Request Parameters

Follow

Preface

The Zend Browser Toolbar allows you to debug files and applications directly from your browser. However, this is only available for Firefox and Internet Explorer browsers.

If you are not using Internet Explorer or Firefox, you can pass debug parameters in the URL (or through COOKIE) in order to initiate a Debug / Profile session in Zend Studio from your browser. The same method can be used to debug a "back-end" PHP application in case of using AJAX or SOAP calls or a Flash/Flex front-end. For example, you can start a debug session using this URL:
http://www.server.com/debug_test.php?start_debug=1&debug_host=127.0.0.1&debug_port=10137

In some cases it is not acceptable to modify the front-end part of the application. In this case consider using either a "proxy" PHP script or the web server's URL Rewrite module to add the required parameters.

Details

The following is a list of parameters which can be passed in the URL (or through COOKIE) in order to invoke functions and control the debugging process:

Parameter Method Description
start_debug GET/COOKIE Starts the debug session.
Set to zero to deactivate the debugger.
debug_host GET/COOKIE The client IP to which debugging results will be returned.
This host should be allowed via php.ini setting zend_debugger.allow_hosts. The default is localhost.
debug_port GET/COOKIE The port to which the debugger will connect. This should match the port number configured in Zend Studio (Window | Preferences, PHP | Debug | Installed Debuggers).
send_sess_end GET/COOKIE Enables data to be sent at the end of a profiling session.
debug_stop GET/COOKIE If set, the debugger will pause at the first line of PHP code.
original_url GET/COOKIE The URL from which the debugging process will start. This is an important parameter, since Path Mapping resolution is based on it.
use_ssl GET/COOKIE If set, the communication with the client is encrypted using SSL.
start_profile GET/COOKIE Starts a profiling session. This cannot be used simultaneously with a start_debug request. The send_sess_end flag must be enabled for profiling results to be returned.
debug_start_session GET/COOKIE Enables debug session capabilities according to the parameter set in debug_cont_session.
debug_start_url GET If the debug_start_session parameter is set, browsing to the URL specified here will activate a debug session. Until this URL is reached, the debugger is not triggered even though a debug session is still active. After the URL is reached, the session will continue according to the settings specified for the debug_cont_session parameter.
debug_cont_session GET If set to 0, a debug session will be launched once when debug_start_url is reached.
If set to 1, the debugging session will be launched once when the next link in the debug_start_url is clicked, a form is posted, or an AJAX request is executed.
If set to 2, a debug session is started whenever the URL set in debug_start_url is browsed to.
no_remote GET/COOKIE If set to 1, the file content will only be taken from files located on the server.
use_remote GET/COOKIE If set to 1, file content will be taken from the project in Zend Studio.
debug_file_bp GET/COOKIE Sets a breakpoint in the specified file.
debug_line_bp GET/COOKIE Sets a breakpoint in the specified line in the file configured in debug_file_bp.
_bm GET/COOKIE Sets a bitmask with the configured options.
debug_jit COOKIE Debugger will delete cookie values after the debug session ends.
debug_fastfile GET/COOKIE Speeds up file exchange. Supported in Zend Studio since version 6.1.0
debug_coverage GET/COOKIE Enables code coverage when profiling.
debug_session_id GET/COOKIE Debug session ID. Zend Studio since version 6.0.0 can work with several simultaneous debug sessions. This parameter allows to specify which debug session to attach to.

 


 


Original Post Date: 2009-10-29 20:46:44

Alternative Description:

This article provides the list of GET parameters that can be used to trigger and control a debug session.

_____
Tags: AJAX,Apple OS X 10.7 (Lion),Apple OS X 10.8 (Mountain Lion),Apple OS X 10.9 (Mavericks),cli,COOKIE,Debian / Ubuntu,debug,debug_host,debug_port,flash,Flex,GET,MacOS 10.6 and earlier,MS Windows 2003 Server,MS Windows 2008 Server,MS Windows 2012 Server,MS Windows 7,MS Windows 8,MS Windows XP,parameter,profile,RedHat Enterprise Linux / CentOS,SOAP,start_debug,SUSE Linux Enterprise Server / OpenSUSE,ZDE 5.x and older,Zend Studio 10.x,Zend Studio 11.x,Zend Studio 7.x,Zend Studio 8.x,Zend Studio 9.x,Zend Studio for Eclipse 6.x,oldKB

Comments