Zend Studio Documentation - "Debugging Using the Zend Browser Toolbar" Zend Studio Documentation - "Debugging a PHP Web Page" This article also explains the remote debugging session flow and the concept of breakpoints and Path Mapping. Additionally, the parameter no_remote can be used - "no_remote=0".Įxcerpt: This article's aim is to describe the remote debugging principles of working, and to list the requirements for making the pre-set breakpoints work. The parameter in question is use_remote and needs to be set - "use_remote=1". From GET or COOKIE parameters Zend Debugger reads the instruction to use files from a project, rather than the ones on the server.According to standard client-server definition, in this communication Zend Studio is the server and Zend Debugger is the client. The communication between Zend Debugger and Zend Studio uses a special debugging protocol. A debug session is started and the communication between Zend Debugger and Zend Studio is established.Zend Debugger "rings back" to Zend Studio on the IP address and TCP port given in GET/COOKIE parameters ( debug_host and debug_port) and asks to start a debug session.Upon detection of relevant GET or COOKIE parameters (mainly, start_debug), Zend Debugger intercepts the script execution. Zend Debugger is installed on the server and hooked into PHP's Zend Engine.The requested file must exist on the server, otherwise the web server will just return HTTP error 404. The web server (Apache or IIS) receives the request and invokes PHP.&original_url=http%3A%2F%2Flocalhost%2Findex.phpįor detailed description of GET/COOKIE parameters, see "Zend Debugger GET Request Parameters". Zend Browser Toolbar or Zend Studio issues a regular HTTP request to the server The request target is a PHP file (for example - Part of the request are GET or COOKIE parameters that trigger the debug session and communicate its settings.Here are the stages of a typical debug session: It provides a description of the processes involved in a debug session, which will help you to understand where the problem may be in your case. In the case that remote debugging works in general, but the execution doesn't stop at breakpoints, read this section. In Zend Studio go to Run | Debug Configurations, select your launch and verify that the Local copy if available option is selected on the Advanced tab: In Zend Browser Toolbar go to Extra Stuff | Settings and ensure that Debug Local Copy is marked: Therefore, if Zend Debugger executes a file that is not part of a Zend Studio project, no breakpoints apply. The breakpoint information is stored in Zend Studio workspace for the files that belong to PHP Projects. Without these instructions Zend Debugger executes files from the server These files have no breakpoint information. This is done by marking the relevant options in either the Zend Browser Toolbar settings or in the debug launch configuration of Zend Studio (see the next two sections). The ultimate condition for making a remote debugging session to stop on breakpoints pre-defined an a Zend Studio project, is instructing Zend Debugger to fetch files from Zend Studio and execute them instead of the corresponding files that reside on the server. Therefore, if this is your preferred method of launching a debug session, you probably should consider a different approach. This functionality does not support the usage scenario in question by design. In the first case, Debug URL, the breakpoints pre-set in the project files will not work. From within Zend Studio, using the Debug As Web Page functionality ( Run | Debug As | PHP Web Page).From Internet Explorer or Firefox, using the Zend Browser Toolbar.From within Zend Studio, using the Debug URL functionality ( Run | Debug URL).Remote debugging can be launched in three ways: This article's aim is to describe the remote debugging principles of working, and to list the requirements for making the pre-set breakpoints work. As a rule, the problem is the incorrect configuration and usage. In 99.9% of cases there is no bug involved in this problem. However, some developers notice that Zend Studio doesn't hit pre-set breakpoints under certain circumstances. The default settings of all Zend components involved in remote debugging are good for most cases and should enable the scenario outlined above. Following the execution of the application by monitoring/controlling the run-time environment at breakpoints.Setting the breakpoints in the relevant project.One of the most common remote debugging scenarios for a PHP developer using Zend Studio is this:
0 Comments
Leave a Reply. |