SlideShare a Scribd company logo
PHP Debugger, Profiler & more Vo Duy Tuan – <tuanmaster2002@yahoo.com> Bloghoctap.com Coding is not enough!
$Table_of_contents IDEs for Web Developer Debugging Profiling Load Testing Tài trợ:
Learn about IDE. IDEs for Web Developer 1
1.1. What is an IDE? Integrated Development Environment Application for software development Common Features:  Syntax highlight Autocomplete File Explorer Collapse/Expand
1.2. Common IDEs for Web Developer Notepad, Notepad++ Adobe Dreamweaver Aptana Komodo PhpEd Zend Studio PHP Designer …
1.3. Recommend Features for PHP IDE Built-in parser Documentor Debugger DB Client Text Format
1.4. Small Quizz What is the difference between 2 screenshots?
IDE for PHP, support HTML, CSS Paid Software, current version: 5.9 Main Features: Debugger Autocomplete DB Client Documentor Code Explorer Exclude folders, files in project. 1.5. NuSphere PhpEd Introduction
1.6. NuSphere PhpEd screenshot
Learn how to use PhpEd Debugger to debug your web applications. Debugging 2
What is debug?  Find errors in your code. How to debug? Output with HTML:  echo() ,  print_r() ,  var_dump() Store debug information: File, Database Live debug: PhpEd Debugger 2.1. Debug Introduction
Integrate with Firefox (DBGbar addon) Step debugging Multi breakpoint Watch runtime variables Watch call stack Remote debugging 2.2. PhpEd Debugger features
2.3. PhpEd Debugger Installation Step 1: Install php extension Step 2: Install DBGbar addon for Firefox Step 3: Update PHP.INI config Restart your web server (if needed)
Step 1: Install PHP Extension Go to ‘C:\..\nusphere\phped\debugger\server\’  Select correct library for your platform and PHP version Copy file (.dll on Windows) to php extension folder
Step 2: Install DBGbar addon In Firefox, go to menu Tools >> Add-ons Search ‘DBGbar’ and install. Restart Firefox, you will get DBGbar toolbar:
Step 3: Update PHP.INI config Add dbg extension to extension list: extension=dbg-php-5.2.dll Add configuration for debugger [debugger]  debugger.enabled=on  debugger.profiler_enabled=on  debugger.hosts_allow=localhost apple.com debugger.hosts_deny=ALL  debugger.ports=7869, 10000/16
2.4. PhpEd Debugger usage
2.5. DEMO Debugging
Learn how to use Xdebug extension to find bottleneck and increase performance for your web applications. Profiling 3
3.1. Profiling Introduction Find bottleneck Make application run faste
3.2. Two ways of profiling Built-in profiler 3 rd -party profiler
3.2.1. Built-in profiler Tracking code embed in your PHP code Example: Using timer start & stop
3.2.1. Built-in profiler…cont.
3.2.2. 3 rd -party profiler Install new extension Do not change your PHP code More Information Famous Library: Xdebug
3.3. Xdebug Installation Step 1: Install php extension Step 2: Update PHP.INI config Restart your server (if needed)
Step 1: Install php extension Download correct extension for your platform & PHP version Can go to ‘ http://www.xdebug.org/find-binary.php ’ to find correct Xdebug file for your system from  phpinfo()  output Copy file (.dll on Windows) to php extension folder
Step 2: Update PHP.INI config Add configuration for xdebug: [xdebug] zend_extension_ts = C:\AppServ\php5\ext\php_xdebug-2.1.0-5.2-vc6.dll xdebug.profiler_output_dir = &quot;C:\xdebug&quot; xdebug.profiler_output_name = &quot;callgrind.%R.%t&quot; xdebug.profiler_enable = 0 xdebug.profiler_append=0 xdebug.profiler_enable_trigger = 1 xdebug.extended_info=1
3.4. Xdebug Usage Step 1: Generate cachegrind file Base on xdebug config in PHP.INI to create cachegrind file. For above php.ini config: Add parameter XDEBUG_PROFILE to your request string will create cachegrind file. Examp;e: Normal :  http://bloghoctap.com Profiler:  http://bloghoctap.com?XDEBUG_PROFILE
2.4. Xdebug Usage… Step 2: View & analyze your profile result: WinCacheGrind Kcachegrind
2.4.1. WinCacheGrind Viewer
2.4.2. Kcachegrind Viewer
3.5. DEMO Profiling
Benchmark your web application. Load Testing 4
4.1. ApacheBench
4.2. Apache jMeter
… Võ Duy Tuấn … [email_address] … Web Freelancer …  PHP Trainer … http://blogHoctap.com you_forgot If
It’s time to  query  … Thanks you!

More Related Content

What's hot (20)

PDF
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
PPTX
Speed up Your Joomla Site for Ultimate Performance
JoomlaDay Australia
 
PPT
Front End Website Optimization
Gerard Sychay
 
ODP
Effective TDD - Less is more
Ben Lau
 
KEY
Oslo WordPress Meetup - June 15, 2011
WPOslo
 
PDF
DrupalCon Barcelona 2015
Daniel Kanchev
 
PDF
Debugging Drupal - How to Debug your Drupal Application
Zyxware Technologies
 
PPTX
I Can Haz More Performanz?
Andy Melichar
 
ODP
Front-End Performance Optimizing
Michael Pehl
 
PDF
Using composer with WordPress
Micah Wood
 
PPTX
"Ensuring chances of theme acceptance in wordpress.org directory" on WordCamp...
Sudeep Balchhaudi
 
PPTX
Squeeze Maximum Performance From Your Joomla Website
SiteGround.com
 
PPT
WordPress MU 101
Pete Mall
 
PPTX
What’s new in joomla 3.7
Tim Plummer
 
PDF
Mastering WordPress Vol.1
Wataru OKAMOTO
 
PDF
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
Tareq Hasan
 
PDF
How to Speed Up Your Joomla! Site
Daniel Kanchev
 
PPTX
Learn How To Develop With CakePHP
Michael Bourque
 
PDF
Ako na vlastne WP temy
Juraj Kiss
 
PPTX
Complete WordPress Setup (Description about Themes & Plugins Added)
Ciceer Ghimirey
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
Speed up Your Joomla Site for Ultimate Performance
JoomlaDay Australia
 
Front End Website Optimization
Gerard Sychay
 
Effective TDD - Less is more
Ben Lau
 
Oslo WordPress Meetup - June 15, 2011
WPOslo
 
DrupalCon Barcelona 2015
Daniel Kanchev
 
Debugging Drupal - How to Debug your Drupal Application
Zyxware Technologies
 
I Can Haz More Performanz?
Andy Melichar
 
Front-End Performance Optimizing
Michael Pehl
 
Using composer with WordPress
Micah Wood
 
"Ensuring chances of theme acceptance in wordpress.org directory" on WordCamp...
Sudeep Balchhaudi
 
Squeeze Maximum Performance From Your Joomla Website
SiteGround.com
 
WordPress MU 101
Pete Mall
 
What’s new in joomla 3.7
Tim Plummer
 
Mastering WordPress Vol.1
Wataru OKAMOTO
 
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
Tareq Hasan
 
How to Speed Up Your Joomla! Site
Daniel Kanchev
 
Learn How To Develop With CakePHP
Michael Bourque
 
Ako na vlastne WP temy
Juraj Kiss
 
Complete WordPress Setup (Description about Themes & Plugins Added)
Ciceer Ghimirey
 

Viewers also liked (12)

PDF
Scale with Microservices
Võ Duy Tuấn
 
PPTX
Reader.vn 2012 - The Book Of Life
Võ Duy Tuấn
 
PPT
Javascript unit testing framework
Võ Duy Tuấn
 
PPTX
Speed up with hiphop php 2014 01-22
Võ Duy Tuấn
 
PPTX
Microservices in production
Võ Duy Tuấn
 
PPTX
React introduction
Võ Duy Tuấn
 
PPTX
Microservices and docker
Võ Duy Tuấn
 
PPTX
Magento overview and how sell Magento extensions
Võ Duy Tuấn
 
PPTX
How to Build Recommender System with Content based Filtering
Võ Duy Tuấn
 
PPTX
How to build a Recommender System
Võ Duy Tuấn
 
PDF
Chatbot in Sale Management
Võ Duy Tuấn
 
PPTX
Business Intelligence in Retail Industry
Võ Duy Tuấn
 
Scale with Microservices
Võ Duy Tuấn
 
Reader.vn 2012 - The Book Of Life
Võ Duy Tuấn
 
Javascript unit testing framework
Võ Duy Tuấn
 
Speed up with hiphop php 2014 01-22
Võ Duy Tuấn
 
Microservices in production
Võ Duy Tuấn
 
React introduction
Võ Duy Tuấn
 
Microservices and docker
Võ Duy Tuấn
 
Magento overview and how sell Magento extensions
Võ Duy Tuấn
 
How to Build Recommender System with Content based Filtering
Võ Duy Tuấn
 
How to build a Recommender System
Võ Duy Tuấn
 
Chatbot in Sale Management
Võ Duy Tuấn
 
Business Intelligence in Retail Industry
Võ Duy Tuấn
 
Ad

Similar to PHP: Debugger, Profiler and more (20)

PPTX
Xdebug
Bryce Embry
 
PDF
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
phpbarcelona
 
PDF
PHP Lab
Leo Nguyen
 
PDF
Profiling PHP with Xdebug / Webgrind
Sam Keen
 
ODP
Xdebug for Beginners
Sean Prunka
 
PDF
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Dennis de Greef
 
PPTX
PHP Profiling/performance
Nicolas Degardin
 
PDF
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Bastian Feder
 
PPT
Php Code Profiling Using X Debug
SergeyChernyshev
 
PDF
Profiling PHP - PHPAmersfoort Meetup 2015-03-10
Dennis de Greef
 
PDF
Profiling PHP - WordPress Meetup Nijmegen 2015-03-11
Dennis de Greef
 
PDF
Getting Started With Xdebug
Jeremy Ward
 
PPTX
Xdebug - Your first, last, and best option for troubleshooting PHP code
Adam Englander
 
PPT
Php Debugger
guest8cd374
 
PDF
Xdebug from a to x
Gennady Feldman
 
PDF
Getting Started with PHP Extensions
MichaelBrunoLochemem
 
PPTX
PHP Aberdeen Quick optimisation of PHP with Webgrind
Andy_Gaskell
 
PDF
php & performance
simon8410
 
ODP
Profiling PHP & Javascript
Dave Ross
 
PPTX
Developing php applications with netbeans ide
Sayed Ahmed
 
Xdebug
Bryce Embry
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
phpbarcelona
 
PHP Lab
Leo Nguyen
 
Profiling PHP with Xdebug / Webgrind
Sam Keen
 
Xdebug for Beginners
Sean Prunka
 
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Dennis de Greef
 
PHP Profiling/performance
Nicolas Degardin
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Bastian Feder
 
Php Code Profiling Using X Debug
SergeyChernyshev
 
Profiling PHP - PHPAmersfoort Meetup 2015-03-10
Dennis de Greef
 
Profiling PHP - WordPress Meetup Nijmegen 2015-03-11
Dennis de Greef
 
Getting Started With Xdebug
Jeremy Ward
 
Xdebug - Your first, last, and best option for troubleshooting PHP code
Adam Englander
 
Php Debugger
guest8cd374
 
Xdebug from a to x
Gennady Feldman
 
Getting Started with PHP Extensions
MichaelBrunoLochemem
 
PHP Aberdeen Quick optimisation of PHP with Webgrind
Andy_Gaskell
 
php & performance
simon8410
 
Profiling PHP & Javascript
Dave Ross
 
Developing php applications with netbeans ide
Sayed Ahmed
 
Ad

More from Võ Duy Tuấn (13)

PPTX
Log management system for Microservices
Võ Duy Tuấn
 
PDF
Multi-tenant Database Design for SaaS
Võ Duy Tuấn
 
PPTX
Flutter introduction
Võ Duy Tuấn
 
PPTX
Mobile outsourcing best practices
Võ Duy Tuấn
 
PPTX
Php psr standard 2014 01-22
Võ Duy Tuấn
 
PPT
Html5, css3 and the future of web technologies
Võ Duy Tuấn
 
PPT
How startups can benefit from launch community
Võ Duy Tuấn
 
PDF
Zingme practice for building scalable website with PHP
Võ Duy Tuấn
 
PDF
Xây dựng mạng xã hội bằng drupal
Võ Duy Tuấn
 
PDF
Web optimization
Võ Duy Tuấn
 
PDF
Speed up zing me – ntvv2 code with PHP extension module
Võ Duy Tuấn
 
PDF
Hanoi php day 2010 program
Võ Duy Tuấn
 
PPT
Social network game service
Võ Duy Tuấn
 
Log management system for Microservices
Võ Duy Tuấn
 
Multi-tenant Database Design for SaaS
Võ Duy Tuấn
 
Flutter introduction
Võ Duy Tuấn
 
Mobile outsourcing best practices
Võ Duy Tuấn
 
Php psr standard 2014 01-22
Võ Duy Tuấn
 
Html5, css3 and the future of web technologies
Võ Duy Tuấn
 
How startups can benefit from launch community
Võ Duy Tuấn
 
Zingme practice for building scalable website with PHP
Võ Duy Tuấn
 
Xây dựng mạng xã hội bằng drupal
Võ Duy Tuấn
 
Web optimization
Võ Duy Tuấn
 
Speed up zing me – ntvv2 code with PHP extension module
Võ Duy Tuấn
 
Hanoi php day 2010 program
Võ Duy Tuấn
 
Social network game service
Võ Duy Tuấn
 

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

PHP: Debugger, Profiler and more

  • 1. PHP Debugger, Profiler & more Vo Duy Tuan – <[email protected]> Bloghoctap.com Coding is not enough!
  • 2. $Table_of_contents IDEs for Web Developer Debugging Profiling Load Testing Tài trợ:
  • 3. Learn about IDE. IDEs for Web Developer 1
  • 4. 1.1. What is an IDE? Integrated Development Environment Application for software development Common Features: Syntax highlight Autocomplete File Explorer Collapse/Expand
  • 5. 1.2. Common IDEs for Web Developer Notepad, Notepad++ Adobe Dreamweaver Aptana Komodo PhpEd Zend Studio PHP Designer …
  • 6. 1.3. Recommend Features for PHP IDE Built-in parser Documentor Debugger DB Client Text Format
  • 7. 1.4. Small Quizz What is the difference between 2 screenshots?
  • 8. IDE for PHP, support HTML, CSS Paid Software, current version: 5.9 Main Features: Debugger Autocomplete DB Client Documentor Code Explorer Exclude folders, files in project. 1.5. NuSphere PhpEd Introduction
  • 9. 1.6. NuSphere PhpEd screenshot
  • 10. Learn how to use PhpEd Debugger to debug your web applications. Debugging 2
  • 11. What is debug? Find errors in your code. How to debug? Output with HTML: echo() , print_r() , var_dump() Store debug information: File, Database Live debug: PhpEd Debugger 2.1. Debug Introduction
  • 12. Integrate with Firefox (DBGbar addon) Step debugging Multi breakpoint Watch runtime variables Watch call stack Remote debugging 2.2. PhpEd Debugger features
  • 13. 2.3. PhpEd Debugger Installation Step 1: Install php extension Step 2: Install DBGbar addon for Firefox Step 3: Update PHP.INI config Restart your web server (if needed)
  • 14. Step 1: Install PHP Extension Go to ‘C:\..\nusphere\phped\debugger\server\’ Select correct library for your platform and PHP version Copy file (.dll on Windows) to php extension folder
  • 15. Step 2: Install DBGbar addon In Firefox, go to menu Tools >> Add-ons Search ‘DBGbar’ and install. Restart Firefox, you will get DBGbar toolbar:
  • 16. Step 3: Update PHP.INI config Add dbg extension to extension list: extension=dbg-php-5.2.dll Add configuration for debugger [debugger] debugger.enabled=on debugger.profiler_enabled=on debugger.hosts_allow=localhost apple.com debugger.hosts_deny=ALL debugger.ports=7869, 10000/16
  • 19. Learn how to use Xdebug extension to find bottleneck and increase performance for your web applications. Profiling 3
  • 20. 3.1. Profiling Introduction Find bottleneck Make application run faste
  • 21. 3.2. Two ways of profiling Built-in profiler 3 rd -party profiler
  • 22. 3.2.1. Built-in profiler Tracking code embed in your PHP code Example: Using timer start & stop
  • 24. 3.2.2. 3 rd -party profiler Install new extension Do not change your PHP code More Information Famous Library: Xdebug
  • 25. 3.3. Xdebug Installation Step 1: Install php extension Step 2: Update PHP.INI config Restart your server (if needed)
  • 26. Step 1: Install php extension Download correct extension for your platform & PHP version Can go to ‘ http://www.xdebug.org/find-binary.php ’ to find correct Xdebug file for your system from phpinfo() output Copy file (.dll on Windows) to php extension folder
  • 27. Step 2: Update PHP.INI config Add configuration for xdebug: [xdebug] zend_extension_ts = C:\AppServ\php5\ext\php_xdebug-2.1.0-5.2-vc6.dll xdebug.profiler_output_dir = &quot;C:\xdebug&quot; xdebug.profiler_output_name = &quot;callgrind.%R.%t&quot; xdebug.profiler_enable = 0 xdebug.profiler_append=0 xdebug.profiler_enable_trigger = 1 xdebug.extended_info=1
  • 28. 3.4. Xdebug Usage Step 1: Generate cachegrind file Base on xdebug config in PHP.INI to create cachegrind file. For above php.ini config: Add parameter XDEBUG_PROFILE to your request string will create cachegrind file. Examp;e: Normal : http://bloghoctap.com Profiler: http://bloghoctap.com?XDEBUG_PROFILE
  • 29. 2.4. Xdebug Usage… Step 2: View & analyze your profile result: WinCacheGrind Kcachegrind
  • 33. Benchmark your web application. Load Testing 4
  • 36. … Võ Duy Tuấn … [email_address] … Web Freelancer … PHP Trainer … http://blogHoctap.com you_forgot If
  • 37. It’s time to query … Thanks you!