IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HOWTO: XDebug and Notepad++
Marshy
post Nov 30 2007, 04:32 AM
Post #1


Junior Member
Group Icon

Group: Member
Posts: 23
Joined: 27-May 07
From: UK
Member No.: 2,807
Main OS: Windows Vista



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 Client
This guide presumes that you are running UniServer and Notepad++ locally.

Server
  1. Download XDebug from XDebug. You need to download the Windows module for PHP 5.2.1-5.2.7.
  2. Copy the file to (Drive Letter):\Uniform Server\udrive\usr\local\php\extensions
  3. Open php.ini and scroll to the end of the file
  4. After the eaccelerator settings, insert the following lines
    CODE
    [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=default
  5. Start the server and go to http://localhost/apanel/phpinfo.php. You should see something like this
    CODE
    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 Rethans

Client
  1. Download and install Notepad++ from here.
  2. Download the DBGP plugin from here (DBGpPlugin_0_6b_dll.zip). Extract the dll to the plugins directory in C:\Program Files\Notepad++\plugins.
  3. Start Notepad++ and go to Plugins > DBGp > Config..
  4. The settings are as follows
    CODE
    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 - Checked
  5. Start the listener by going to Plugins > DBGp > Debugger. This should open a new panel @ the bottom of the screen.
  6. Open up IE and load a page, for example http://localhost/index.php

If 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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
olajideolaolorun
post Dec 2 2007, 07:08 PM
Post #2


Project Manager
Group Icon

Group: Admin
Posts: 2,307
Joined: 15-February 05
From: Clarkston, GA
Member No.: 1
SourceForge ID: empirex
Wiki ID: olajideolaolorun
IRC Nickname: Olajide
Main OS: Windows Vista



Moved... smile.gif


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2nd September 2010 - 07:21 PM
SourceForge.net Logo