Xdebug, KCacheGrind and Webgrindwith WampServer11 July 2010Warsaw, PolandMichał SzkodzińskiIT ManagerMediovski Technology
Summary
Summary3/21This presentation showshow to use KCacheGrind and Webgrindwith Xdebug PHP extension works on WampServer.You need WampServer, base knowledge about profiling PHP applications,internet connection and 15 minutes of free time.You can find all usefull web addresses on the last slide.
Agenda4/21Xdebug extension for PHPKCacheGrind for WindowsWebgrind Connect KCacheGrind and Webgrind with WampServer
1. Install Xdebug
1. Download Xdebug binaries for Windows from:http://www.xdebug.org/download.phpXdebug6/21Choose file for your PHP and Windows version - I get '5.3 VC6 (32 bit)'2. Save dll file to your PHP extensions directory, for exampleC:\wamp\bin\php\php5.3.1\ext3. Rename dll file to php_xdebug.dll
7/214. Add new line in Your php.ini file:extension=php_xdebug.dllzend_extension = c:\wamp\bin\php\php5.3.1\ext\php_xdebug.dllxdebug.remote_enable=1xdebug.remote_host="127.0.0.1"xdebug.remote_port=9000xdebug.remote_handler="dbgp"xdebug.remote_mode=reqxdebug.profiler_enable=1xdebug.profiler_output_dir="c:/wamp/tmp/"xdebug.collect_params=Onxdebug.show_local_vars=OnXdebugCheck if paths are correct for your WampServer configuration.
2. Install KCacheGrind
1. Download and run The KDE on Windows installerfrom The KDE on Windows Project websitehttp://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-latest.exeKCacheGrind9/21
2. Type path to installation directory, for example C:\Program Files\KDE3. Choose kcachegrind from list of packagesKCacheGrind10/21
4. You can find KCacheGrind in KDE bin directory,for example C:\Program Files\kde\binKCacheGrind11/21
3. Install Webgrind
13/211. Download zip archive from http://code.google.com/p/webgrind/downloads/list2. Extract to your root www directory, for exampleC:\wamp\www\webgrind3. You can find it on http://localhost/webgrindWebgrind
4. Connect with WampServer
1. Edit your WampServer template file C:\wamp\wampmanager.tpl2. Add three new lines in [Menu.Left] section:Type: item; Caption: "KCacheGrind"; Action: run; FileName:"C:\Program Files\kde\bin\kcachegrind.exe"; Parameters: ""; Glyph: 5Type: item; Caption: "Webgrind"; Action: run; FileName: "${c_navigator}";Parameters: "http://localhost/webgrind/"; Glyph: 5Type: separator; Caption: ""WampServer15/21Check if file names are correct.
WampServer16/213. Restart WampServer4. Now You can launch KCacheGrind and Webgrind from WampServer menu5. Use it to improve performance of Your PHP based application
5. Use new features
KCacheGrind18/21Choose cachegrind fileSee calers and callee mapSwitch to relative viewSearch and group function
Webgrind19/21Choose cachegrind fileSort by type of function, count or costOpen fileSee calls and called from
Web addresses20/21Usefull web addresses:WampServerhttp://www.wampserver.com/en – homepagehttp://www.wampserver.com/dl.php – downloadXdebughttp://www.xdebug.org – product homepagehttp://www.xdebug.org/download.php – downloadKCacheGrindhttp://kcachegrind.sourceforge.net/html/Home.html – product homepageThe KDE on Windows Projecthttp://windows.kde.org – project homepagehttp://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-latest.exe – installerWebgrindhttp://code.google.com/p/webgrind – project homepagehttp://code.google.com/p/webgrind/downloads/detail?name=webgrind-release-1.0.zip – download
21/21QuestionsQuestions? Contact us!Mediovski Technologyul. Wita Stwosza 4002-661 Warsaw, Polandphone: +48 22 646 76 84e-mail: technology@mediovski.plwww: http://technology.mediovski.plJoin us:

Xdebug, KCacheGrind and Webgrind with WampServer

  • 1.
    Xdebug, KCacheGrind andWebgrindwith WampServer11 July 2010Warsaw, PolandMichał SzkodzińskiIT ManagerMediovski Technology
  • 2.
  • 3.
    Summary3/21This presentation showshowto use KCacheGrind and Webgrindwith Xdebug PHP extension works on WampServer.You need WampServer, base knowledge about profiling PHP applications,internet connection and 15 minutes of free time.You can find all usefull web addresses on the last slide.
  • 4.
    Agenda4/21Xdebug extension forPHPKCacheGrind for WindowsWebgrind Connect KCacheGrind and Webgrind with WampServer
  • 5.
  • 6.
    1. Download Xdebugbinaries for Windows from:http://www.xdebug.org/download.phpXdebug6/21Choose file for your PHP and Windows version - I get '5.3 VC6 (32 bit)'2. Save dll file to your PHP extensions directory, for exampleC:\wamp\bin\php\php5.3.1\ext3. Rename dll file to php_xdebug.dll
  • 7.
    7/214. Add newline in Your php.ini file:extension=php_xdebug.dllzend_extension = c:\wamp\bin\php\php5.3.1\ext\php_xdebug.dllxdebug.remote_enable=1xdebug.remote_host="127.0.0.1"xdebug.remote_port=9000xdebug.remote_handler="dbgp"xdebug.remote_mode=reqxdebug.profiler_enable=1xdebug.profiler_output_dir="c:/wamp/tmp/"xdebug.collect_params=Onxdebug.show_local_vars=OnXdebugCheck if paths are correct for your WampServer configuration.
  • 8.
  • 9.
    1. Download andrun The KDE on Windows installerfrom The KDE on Windows Project websitehttp://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-latest.exeKCacheGrind9/21
  • 10.
    2. Type pathto installation directory, for example C:\Program Files\KDE3. Choose kcachegrind from list of packagesKCacheGrind10/21
  • 11.
    4. You canfind KCacheGrind in KDE bin directory,for example C:\Program Files\kde\binKCacheGrind11/21
  • 12.
  • 13.
    13/211. Download ziparchive from http://code.google.com/p/webgrind/downloads/list2. Extract to your root www directory, for exampleC:\wamp\www\webgrind3. You can find it on http://localhost/webgrindWebgrind
  • 14.
    4. Connect withWampServer
  • 15.
    1. Edit yourWampServer template file C:\wamp\wampmanager.tpl2. Add three new lines in [Menu.Left] section:Type: item; Caption: "KCacheGrind"; Action: run; FileName:"C:\Program Files\kde\bin\kcachegrind.exe"; Parameters: ""; Glyph: 5Type: item; Caption: "Webgrind"; Action: run; FileName: "${c_navigator}";Parameters: "http://localhost/webgrind/"; Glyph: 5Type: separator; Caption: ""WampServer15/21Check if file names are correct.
  • 16.
    WampServer16/213. Restart WampServer4.Now You can launch KCacheGrind and Webgrind from WampServer menu5. Use it to improve performance of Your PHP based application
  • 17.
    5. Use newfeatures
  • 18.
    KCacheGrind18/21Choose cachegrind fileSeecalers and callee mapSwitch to relative viewSearch and group function
  • 19.
    Webgrind19/21Choose cachegrind fileSortby type of function, count or costOpen fileSee calls and called from
  • 20.
    Web addresses20/21Usefull webaddresses:WampServerhttp://www.wampserver.com/en – homepagehttp://www.wampserver.com/dl.php – downloadXdebughttp://www.xdebug.org – product homepagehttp://www.xdebug.org/download.php – downloadKCacheGrindhttp://kcachegrind.sourceforge.net/html/Home.html – product homepageThe KDE on Windows Projecthttp://windows.kde.org – project homepagehttp://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-latest.exe – installerWebgrindhttp://code.google.com/p/webgrind – project homepagehttp://code.google.com/p/webgrind/downloads/detail?name=webgrind-release-1.0.zip – download
  • 21.
    21/21QuestionsQuestions? Contact us!MediovskiTechnologyul. Wita Stwosza 4002-661 Warsaw, Polandphone: +48 22 646 76 84e-mail: [email protected]: http://technology.mediovski.plJoin us: