


It is recommended to use an external browser though. Now you can simply click "Debug" and the debug session should open in your browser.Ĭhoosing the browser to use for debuggingīy default, eclipse launches the debug session inside the internal browser. This server simply needs to have the correct URL to your project,Īnd the path to the Document root (Preferences -> PHP -> PHP Servers):Īfter you've setup the PHP server, you can create a new debug configuration (Run -> Debug Configurations -> PHP Web Application) using the newly created server: If you're using VirtualHosts for your local project, you need to configure a PHP Server first. Notice that the debugging session will still be open after pressing F8 (Resum), so you simply need to refresh the browser to restart debugging your script. Use Step Into (F5), Step Over (F6), Step Out (F7) or Resume (F8) to go through your scripts step by step. You can set a breakpoint in the editor on any line by double clicking on a line number on the left.

This will launch the default workbench browser with the URL and stop at the first line index.php (this is configurable via the Debug configuration): To debug your script, all you need to do is right-clicking the index.php file and select Debug as -> PHP Web Application. Now let's create a new empty PHP project named "MyProject" in the default PHP server and a simple index.php in the root of the project. The new project will be created in a subfolder of the Local Web Root of the selected server, not When creating a new PHP project, you will now see a 3rd option named Create project on local server. So the first thing to do is to open the PHP Servers preference page, and set the Local Web Root to the DocumentRoot The default PHP server is and has no Local Web Root set. Typically you will set the Local Web Root of the default PHP server ( to the DocumentRoot of your local Web server (e.g. The script index.php in the root of your Project with the default PHP Server, PDT will launch a debug session in a browser with the URL If the Local Web Root property of a server is set, you can choose the Server as the base-directory in the New PHP Project dialog (see screenshot below). When you start a debug session, the Base URL is used in conjunction with the path of the script you're debugging to determine the absolute URL to open. The following examples assume you're debugging on a local mashine, not a remote server.ĭebugging using the default DocumentRoot ( PDT provides a preference dialog to configure different PHP servers.Įach server has has a Base URL and a Local Web Root property. Is loaded by your server, use the phpinfo() method and check if you can find an Xdebug configuration section. Typically you set this value in your php.ini. The most important setting for Xdebug to work with PDT is xdebug.remote_enable = 1. To setup Xdebug as your default debugger in PDT, simply configure the Default Settings in the Debug eclipse preference page of PHP
GEANY DEBUG HOW TO
See the Installation section of the Xdebug manual for how to obtain the extension.
GEANY DEBUG INSTALL
The first step is to install Xdebug and verify that Xdebug is running. PDT has built in support for Xdebug, which allows you to step-debug through your PHP projects. Xdebug is an opensource Debugger and Profiler for PHP. 3.3 Choosing the browser to use for debugging.3.1 Debugging using the default DocumentRoot (.By the way, don't forget to check out the reference links for complete detail (especially the 2nd and 5th).Ĥ. Now, I think rest of the debugging is easy - just select the file and load it in the debugger and there you'll have all the options including breakpoints and executing line by line.ĭon't forget that now you have got debug terminal, you can straight away use any of the gdb's (I am thinking you have GDB debugger) commmands. Now, you may see Debug option at the bottom of geany: Set Debugger to active by ticking the checkbox and then click O.K.
GEANY DEBUG SOFTWARE
Install Geany Debugger Plugin and then you can easily execute your program line by line.įrom Ubuntu Software centre or anything you have which do similar job
