![]() To give this prompt, we just edit the table and add the following mapping: ‘C:projecthtdocswizard.php’ ‘/home/nnmatveev/wizard.php‘. The debugger resolves symlinks, and, as soon as the IDE receives a message that tells it to stop in the file with the ‘/home/nnmatveev/wizard.php‘ path, we need to “prompt” the IDE about the location of the corresponding file ‘C:projecthtdocswizard.php‘ in the project. On the remote host, the ‘ /home/nnmatveev/file. Accordingly, we need to specify the following path mapping: ‘ C:projecthtdocs’ ‘/home/nnmatveev/www/htdocs’. The local copy of these files on the client machine is stored in the folder ‘ C:projecthtdocs‘. The root directory for files on the server is ‘/home/nnmatveev/www/htdocs‘. Let’s consider the example in Picture 4 above. If necessary, you can specify path mappings for any subdirectory or even file separately. Picture 4: Path mappings tree table How do path mappings work?Ī path mapping specified for a parent directory is automatically applied to all its subdirectories. Path mappings are set through a TreeTable which is both a project tree and a table for specifying corresponding path. In this case, the IDE will open files according to the paths received from the debugger. If the files that the server processes are in the project and you are not using symlinks, clear the “Use path mappings” check box. Because the debugger resolves symlinks during a debugging session, you need to tell the IDE actual absolute physical paths to the files on the server. The files processed by the server and the files opened in the IDE are the same, but symlinks are used.The server is remote and the project files are local copies of the originals.You need to use path mappings when the paths to the files processed by the server differ from the paths to the files in the project. Picture 3: Example of server configuration When do I need to set path mappings? We will consider this setting with more details later. Use path mappings – select this check box if the server is remote or symlinks are used.Debugger – the debugging engine installed on the host and integrated with the server. ![]() ![]() Host – the name of the host where the application is executed.Picture 2: Empty server configuration What does each field define? The right-hand pane shows an empty server configuration (Picture 2). Server Configurationįirst of all, add a new server configuration in the Project Settings | PHP | Servers (Picture 1). In this article we will explain how to do it. However, sometimes you may still need to configure debugging manually. I have other posts, linked below, to help with some of these alternative setups.In the previous post Zero-configuration debugging with XDebug and PhpStorm 2.0, we discussed setting up debugging automatically. We didn’t have a firewall to contend with, and the server was set up locally rather than inside a virtual machine. This was a very simplistic local development environment setup. Of course we could have created the server ahead of time and not be prompted to Accept the incoming connection, but what is the fun in that? In most cases we can simply click Accept and let things happen normally.īehind the scenes, PhpStorm created a site and associated it with the project. This will cause PhpStorm to prompt after it receives the debug connection from Zend Debugger. Then a browser with the application rendered I click the debug icon in the Z-Ray toolbar at the foot of the window, and select the desired debugging action. (Usually in the upper right corner, looks like a telephone receiver with a red indicator that it is not listening, and turns green when you click it) With the project open in PhpStorm I click the icon to inform the IDE to start listening for debugging sessions. The local project set up as an Apache virtualhost.(in this example I have a Zend Expressive Skeleton ready) A local project set up on PhpStorm, without the server set up in the PhpStorm project configuration.Ensure that Z-Ray is active in the Zend Server settings.Alternatively I could have had a vanilla LAMP environment with Xdebug. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |