For more information, refer to Step through the program. To control the program execution manually, step through the code using the commands under the Run menu or toolbar buttons: Step Into F7, Step Out Shift+F8, Step Over F8, and others. For more information, refer to the section Examine a suspended program.Ĭontinue running the program and examine its frames as soon as it is suspended again. ![]() All currently active frames are displayed on the Frames pane of the Debug tool window, where you can switch between them and analyze the information stored therein in the Variables and Watches panes. A frame corresponds to an active method or function call and stores the local variables of the called method or function, the arguments to it, and the code context that enables expression evaluation. To start debugging, click the Debug button on the toolbar.Īs soon as the debugger suspends on reaching the first breakpoint, examine the application by analyzing frames. Initiate a debugging session and examining the suspended program Choose a configured browser from the Browser list or click Browse and specify another browser in the Web Browsers and Preview dialog that opens. Specify the browser to open the application in. The URL address is composed dynamically as you type. The read-only field below shows the URL address of the application starting page. For in-place servers, it is the project root. Specify the path relative to the server configuration root ( The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. In the Start URL field, type the server path to the file that implements the application starting page. and define a debug server configuration in the Servers dialog that opens as described in Create a PHP debug server configuration. The PHP Web Page dialog opens.Ĭhoose the applicable debug server configuration from the Server list or click Browse. From the list, select the PHP Web Page configuration type. Press Alt+Shift+F10, then press 0 to display the Edit Configuration dialog or select the configuration from the popup and press F4.Ĭlick on the toolbar or press Insert. Open the Run/Debug Configuration dialog by doing one of the following: Line breakpoints can be set only on executable lines, but not on comments, declarations, or empty lines.Ĭlick the gutter area at a line where you want to toggle a breakpoint.Ĭreate a debug configuration of the type PHP Web Page Place the caret at the desired line of the source code.īreakpoints can be set in the PHP context inside php, html, and files of other types. Your breakpoints don't affect your source files directly, but the breakpoints and their settings are saved with your PhpStorm project, so you can reuse them across debugging sessions. Breakpoints can be set at any time during the debugging process. However, PhpStorm can use breakpoints as triggers for a variety of different actions. Typically, the purpose behind setting a breakpoint is to suspend program execution to allow you to examine program data. Click Open in Editor.īreakpoints are source code markers used to trigger actions during a debugging session. In the CLI Interpreters dialog that opens, the Configuration file read-only field shows the path to the active php.ini file. On the PHP page that opens, click next to the CLI Interpreter field. In the Settings dialog ( Control+Alt+S), click PHP. Open the active php.ini file in the editor: To avoid this problem, you need to update the corresponding sections in the php.ini file as described in Configure Xdebug and Configure Zend Debugger. These tools cannot be used simultaneously because they block each other. ![]() PhpStorm supports debugging with two most popular tools: Xdebug and Zend Debugger. Prepare the debugging engineīefore you start debugging, make sure that you have a debugging engine installed and configured properly. To have incoming connections to this script ignored, add the menu-ajax-script.php script to the skipped paths list. However, this script is still requested during the debugging session. This script works properly, so you do not need to debug it. ![]() ![]() Suppose you have a menu-ajax-script.php that "reloads" a part of your web page. This approach can be useful, when your application contains scripts that use AJAX. You can also specify the scripts requests to which you want PhpStorm to ignore during debugging. In this debugging mode, PhpStorm fully controls the debugging process: it launches the application, opens the browser, and activates the debugging engine according to a PHP Web Page debug configuration.Ī PHP Web Page debug configuration tells PhpStorm the URL address to access the starting page of the application, the browser to open the starting page in, and the debug server configuration to use.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |