SlideShare ist ein Scribd-Unternehmen logo
1 von 21
How XDebugrestored partial sanity to the insane world of PHP
In the beginning ……. Echo Print
In the beginning ……. var_dump print_r
In the beginning …….
In the beginning …….
In the beginning …….
In the beginning …….
In the beginning …….
In the beginning …….
Installation and Setup http://www.xdebug.org/find-binary.php
Installation and Setup
Installation and Setup
How to use break points XDEBUG_SESSION_START=true
Navigation Debug Mode
Navigation Debug Mode
Navigation Debug Mode
Features
Features
Features
Thank You References:  http://www.xdebug.org http://www.eclipse.org Images: xDebug Logo: http://www.xdebug.org/images/xdebug-logo.png Eclipse Logo:  http://www.eclipse.org PHP Logo: http://www.php.net Print Icon: http://icons.iconarchive.com/icons/mart/glaze/128/printer-1-icon.png Sound Wave: http://docstore.mik.ua/orelly/web2/audio/figs/aud.0210.g

Weitere ähnliche Inhalte

Andere mochten auch

詳説ぺちぺち
詳説ぺちぺち詳説ぺちぺち
詳説ぺちぺち
do_aki
 
Webサーバ勉強会4 nginx で php-fpm を動かしてみた
Webサーバ勉強会4 nginx で php-fpm を動かしてみたWebサーバ勉強会4 nginx で php-fpm を動かしてみた
Webサーバ勉強会4 nginx で php-fpm を動かしてみた
do_aki
 
Web 2 0_tools_sp11_group_a
Web 2 0_tools_sp11_group_aWeb 2 0_tools_sp11_group_a
Web 2 0_tools_sp11_group_a
bartlettrl
 
Php in ruby
Php in rubyPhp in ruby
Php in ruby
do_aki
 
Immortal
ImmortalImmortal
Immortal
do_aki
 
php and sapi and zendengine2 and...
php and sapi and zendengine2 and...php and sapi and zendengine2 and...
php and sapi and zendengine2 and...
do_aki
 
N:1 Replication meets MHA
N:1 Replication meets MHAN:1 Replication meets MHA
N:1 Replication meets MHA
do_aki
 

Andere mochten auch (16)

php in ruby
php in rubyphp in ruby
php in ruby
 
20111029 rubyon php
20111029 rubyon php20111029 rubyon php
20111029 rubyon php
 
詳説ぺちぺち
詳説ぺちぺち詳説ぺちぺち
詳説ぺちぺち
 
20110910 闇鍋的php魔改造
20110910 闇鍋的php魔改造20110910 闇鍋的php魔改造
20110910 闇鍋的php魔改造
 
Webサーバ勉強会4 nginx で php-fpm を動かしてみた
Webサーバ勉強会4 nginx で php-fpm を動かしてみたWebサーバ勉強会4 nginx で php-fpm を動かしてみた
Webサーバ勉強会4 nginx で php-fpm を動かしてみた
 
MySQL Casual Talks 7 「N:1 レプリケーション ~進捗どうですか?~」
MySQL Casual Talks 7 「N:1 レプリケーション ~進捗どうですか?~」MySQL Casual Talks 7 「N:1 レプリケーション ~進捗どうですか?~」
MySQL Casual Talks 7 「N:1 レプリケーション ~進捗どうですか?~」
 
Web 2 0_tools_sp11_group_a
Web 2 0_tools_sp11_group_aWeb 2 0_tools_sp11_group_a
Web 2 0_tools_sp11_group_a
 
Php in ruby
Php in rubyPhp in ruby
Php in ruby
 
N対1 レプリケーション + Optimizer Hint
N対1 レプリケーション + Optimizer HintN対1 レプリケーション + Optimizer Hint
N対1 レプリケーション + Optimizer Hint
 
Immortal
ImmortalImmortal
Immortal
 
php and sapi and zendengine2 and...
php and sapi and zendengine2 and...php and sapi and zendengine2 and...
php and sapi and zendengine2 and...
 
20150212 プレゼンテーションzen
20150212 プレゼンテーションzen20150212 プレゼンテーションzen
20150212 プレゼンテーションzen
 
Stop multiplying by 4: Practical Software Estimation
Stop multiplying by 4: Practical Software EstimationStop multiplying by 4: Practical Software Estimation
Stop multiplying by 4: Practical Software Estimation
 
php7's ast
php7's astphp7's ast
php7's ast
 
N:1 Replication meets MHA
N:1 Replication meets MHAN:1 Replication meets MHA
N:1 Replication meets MHA
 
PHP AST 徹底解説
PHP AST 徹底解説PHP AST 徹底解説
PHP AST 徹底解説
 

Ähnlich wie How x debug restored partial sanity to the insane

Open Source in Higher Education 2007
Open Source in Higher Education 2007Open Source in Higher Education 2007
Open Source in Higher Education 2007
ssorden
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
phpbarcelona
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
DrupalCampDN
 
Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platform
BeMyApp
 
Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)
LewisB2013
 
Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
Lorna Mitchell
 

Ähnlich wie How x debug restored partial sanity to the insane (20)

Find WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profilingFind WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profiling
 
Open Source in Higher Education 2007
Open Source in Higher Education 2007Open Source in Higher Education 2007
Open Source in Higher Education 2007
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
 
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
Optimize Site Deployments with Drush (DrupalCamp WNY 2011)
 
More Browser Basics, Tips & Tricks 3 Draft 8
More Browser Basics, Tips & Tricks 3 Draft 8More Browser Basics, Tips & Tricks 3 Draft 8
More Browser Basics, Tips & Tricks 3 Draft 8
 
Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platform
 
Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platform
 
ElggCamp Santiago> For Developers!
ElggCamp Santiago> For Developers!ElggCamp Santiago> For Developers!
ElggCamp Santiago> For Developers!
 
ElggCamp Santiago - Dev Edition
ElggCamp Santiago - Dev EditionElggCamp Santiago - Dev Edition
ElggCamp Santiago - Dev Edition
 
Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)
 
Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
 
Deployment talk dpc 13
Deployment talk dpc 13Deployment talk dpc 13
Deployment talk dpc 13
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
Betabeers Android as a Digital Signage platform
Betabeers   Android as a Digital Signage platformBetabeers   Android as a Digital Signage platform
Betabeers Android as a Digital Signage platform
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2
 
Diagnosing WordPress: What to do when things go wrong
Diagnosing WordPress: What to do when things go wrongDiagnosing WordPress: What to do when things go wrong
Diagnosing WordPress: What to do when things go wrong
 

Mehr von Chuck Reeves

Stop multiplying by 4 PHP Tour 2014
Stop multiplying by 4 PHP Tour 2014Stop multiplying by 4 PHP Tour 2014
Stop multiplying by 4 PHP Tour 2014
Chuck Reeves
 
Software requirements and estimates
Software requirements and estimatesSoftware requirements and estimates
Software requirements and estimates
Chuck Reeves
 

Mehr von Chuck Reeves (8)

How to use SELINUX (No I don't mean turn it off)
How to use SELINUX (No I don't mean turn it off)How to use SELINUX (No I don't mean turn it off)
How to use SELINUX (No I don't mean turn it off)
 
Stop multiplying by 4 Laracon
Stop multiplying by 4 LaraconStop multiplying by 4 Laracon
Stop multiplying by 4 Laracon
 
Stop multiplying by 4 Lone Star PHP
Stop multiplying by 4 Lone Star PHPStop multiplying by 4 Lone Star PHP
Stop multiplying by 4 Lone Star PHP
 
Single page Apps with Angular and Apigility
Single page Apps with Angular and ApigilitySingle page Apps with Angular and Apigility
Single page Apps with Angular and Apigility
 
Zend Framework Foundations
Zend Framework FoundationsZend Framework Foundations
Zend Framework Foundations
 
Stop multiplying by 4 nyphp
Stop multiplying by 4 nyphpStop multiplying by 4 nyphp
Stop multiplying by 4 nyphp
 
Stop multiplying by 4 PHP Tour 2014
Stop multiplying by 4 PHP Tour 2014Stop multiplying by 4 PHP Tour 2014
Stop multiplying by 4 PHP Tour 2014
 
Software requirements and estimates
Software requirements and estimatesSoftware requirements and estimates
Software requirements and estimates
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

How x debug restored partial sanity to the insane

Hinweis der Redaktion

  1. There was echo and print And it was good
  2. Then came print_r & var_dumpAnd it was good
  3. Then a horrible evil came upon the world..
  4. Magento forces MVC and EAV. Configuration is a mix between DB, config files and code. Objects use magic methods __get __call __set etc.Lazy Loading and CachingPoor documentation on the set up.Oh yea the singletons, collections and helpers make a fine mess when trying to do something.
  5. I was going to paste in a full print_r or var_dump of one of the objectsBut one of the simplest objects took about 20 slides So as you can see usingprint_r and var_dump will be troublesome since you have to send all this data over http to the browser to look at it.
  6. What was I to do?How can I go on and make changes in Magento ?How the hell did others make wonderful extensions and plugins ?
  7. xDebug provided the solutionYou can set break pointsget stack tracesview data and objects as they are being instantiated
  8. Now I was able to get to work coding and making the boss happy which made me happy
  9. Gotohttp://www.xdebug.org/find-binary.phpPaste in the output of : php -iDownload the binary suggestedInstall the binary as a zend_extensionMake sure you have a php.iniDerickRethans offers a suggestion on the page as wellphp –i >> info.txtremote_enable: Starts a remote session when flag calledremote_host: sets the host name remote_port: 9000 by default change for firewallremote_handler: dbgp (debugging protocol)
  10. Eclipse is a little more complicated Before you start: Make sure all files your code can touch is located in projects or is referenced in the include pathsNote: Break at 1st line needs eclipse to restart to take effect
  11. Use Multi session to on Accept Remote Session JIT (Just In Time)
  12. Just Double click on the line you want to break You can also right click and select toggle break pointOpen the browser Pass in XDEBUG_SESSION_START=true in the URL (Switch to eclipse )
  13. Debug Tab: Controls stepping and displays current stack traceF5 – StepF6 – Step over (skips over a function call)F7 – Step Return When in a function will continue to the return statementF8 – Resume to next breakpointPHP stores the stack in strange ways (too much to explain in class) which is why you will see the stack as a tree
  14. Variables Tab, Lists all variables, the current state and there value (Cannot change values of variables here)
  15. Breakpoints TabAllow you to toggle breakpoints on and off Can set the condition for the variable to allow you to change values Step filters are not implemented
  16. Improved Error Out putting
  17. Profiling (cache grind)
  18. Code Coverage (PHP Unit)
  19. Thanks!!!