Marshy Posted November 30, 2007 Report Share Posted November 30, 2007 This is a quick guide to show you how to setup XDebug and Notepad++ to debug your apps.The guide is split into two parts: Server and ClientThis guide presumes that you are running UniServer and Notepad++ locally. ServerDownload XDebug from XDebug. You need to download the Windows module for PHP 5.2.1-5.2.7.Copy the file to (Drive Letter):\Uniform Server\udrive\usr\local\php\extensionsOpen php.ini and scroll to the end of the fileAfter the eaccelerator settings, insert the following lines [xdebug] zend_extension_ts=/usr/local/PHP/extensions/php_xdebug-2.0.2-5.2.5.dll xdebug.remote_autostart=on xdebug.remote_enable=on xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.idekey=defaultStart the server and go to http://localhost/apanel/phpinfo.php. You should see something like this This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick RethansClientDownload and install Notepad++ from here.Download the DBGP plugin from here (DBGpPlugin_0_6b_dll.zip). Extract the dll to the plugins directory in C:\Program Files\Notepad++\plugins.Start Notepad++ and go to Plugins > DBGp > Config..The settings are as follows Remote Server IP = (blank) IDE KEY = (blank) Remote Path = W:\www Local Path = W:\www Refresh local context on every step - Checked Refresh Global context on every step - CheckedStart the listener by going to Plugins > DBGp > Debugger. This should open a new panel @ the bottom of the screen.Open up IE and load a page, for example http://localhost/index.phpIf everything has gone to plan Notepad++ should start flashing in the Taskbar.There are buttons to step in/over lines and if you highlight a variable and press Crtl - F7 it wil show you the contents (this works for objects/classes too). I hope this is of use.When the wiki is back up I plan to copy it over and hopefully expand. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.