SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
DEBUGGING AND MAGENTO
Tony Brown
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
• Worked on Magento since 2009
• Technical Director @ Space 48
• Love learning and collaborating
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Overview
• Types of debugging
• Strategies
• Tools
• Working example
• Magento 2
• Any questions / suggestions?
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Why?
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Types of Debugging
• Bugs during development
• Bugs that are “live”
• Site down
• Performance issues
• Feature broken
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Strategies - General
• What has changed?
• Are we seeing any errors?
• Eliminate as much as possible at each step
• Themes
• Modules
• Utilise logging / monitoring
• Use your tools wisely
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
• Defensive coding
• Include descriptive errors
• Collaborate
• Don’t let ego hold you back
• Ideas through explanation
Strategies - General
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
• Defensive coding
• Include descriptive errors
• Collaborate
• Don’t let ego hold you back
• Ideas through explanation
Strategies - General
• Try and step back regularly
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
• Defensive coding
• Include descriptive errors
• Collaborate
• Don’t let ego hold you back
• Ideas through explanation
Strategies - General
• Try and step back regularly
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Strategies - General
• Community resources
• Google - Blogs etc
• Magento Stack Exchange
• Twitter
• Automated testing
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Tools in Magento
• Template path hints
• Profiler
• Logging
• Developer Mode (display_errors on)
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Additional Tools
• PhpStorm
• Magicento
• Xdebug
• N98 Magerun
• Commerce Bug
• Z-ray Toolbar
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Additional Tools
• Firegento Debug
• Aoe Template Hints
• Aoe Profiler
• New Relic
• Blackfire
• ECG coding standard
• Automated Tests (PhpUnit, MageSpec etc)
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• A store with an order export integration stops
• Based on Magento cron to send orders via API
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• A store with an order export integration stops
• Based on Magento cron to send orders via API
• Has anything changed?
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• A store with an order export integration stops
• Based on Magento cron to send orders via API
• Has anything changed?
• Are we receiving any errors?
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• A store with an order export integration stops
• Based on Magento cron to send orders via API
• Has anything changed?
• Are we receiving any errors?
• Check the cron_schedule table
• Some errors present, but no new jobs scheduled
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• Is the Magento cron task present in the system
cron?
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• Is the Magento cron task present in the system
cron?
• Manually run the cron and monitor output
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• Check the process on the server - It’s stuck!
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• Check the process on the server - It’s stuck!
• Kill the process!!
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• Check the process on the server - It’s stuck!
• Kill the process!!
• Test!!
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• Check the process on the server - It’s stuck!
• Kill the process!!
• Test!!
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Working Example
• What can we learn?
• The cron checks to see if it is already running
• We should monitor this going forward
• Look for any errors in table or logs
• If it is a heavy install could use Aoe_Scheduler
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Magento 2?
• XML validation
• More modern best practices
• Better methods to change system behaviour in a
more targeted way
• Code should be more decoupled which should
help reduce bugs during upgrades
• New architecture makes automated testing easier
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Magento 2?
• More code re-use with components through
composer
• Logging is now achieved with Monolog
• Can log to different channels (email, Logstash)
• FireBug and ChromePHP
• bin/magento command line tool
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Tools for Magento 2
• Z-Ray debug toolbar
• CedCommerce Debug Tool
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Tools for Magento 2
• Commerce bug
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Tools for Magento 2
• Magicento
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
Tools for Magento 2
• n98 magerun 2
• working version but only has a small percentage
of the commands so far
@TONEGOLF71
@SPACE48ERS
#MAGETITANS
THANKS!!
Any questions or tool suggestions to share?

Weitere ähnliche Inhalte

Was ist angesagt?

JavaSkop - Automation Skopje
JavaSkop - Automation SkopjeJavaSkop - Automation Skopje
JavaSkop - Automation Skopje
Ana Sarbescu
 

Was ist angesagt? (20)

Develop 4 Developers
Develop 4 DevelopersDevelop 4 Developers
Develop 4 Developers
 
OpenNTF Essentials
OpenNTF EssentialsOpenNTF Essentials
OpenNTF Essentials
 
Let's play with ASP.NET 5 (vNext) RC1
Let's play with ASP.NET 5 (vNext) RC1Let's play with ASP.NET 5 (vNext) RC1
Let's play with ASP.NET 5 (vNext) RC1
 
Five steps towards your testing dream
Five steps towards your testing dreamFive steps towards your testing dream
Five steps towards your testing dream
 
That worked before
That worked beforeThat worked before
That worked before
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
 
Perl testing 101
Perl testing 101Perl testing 101
Perl testing 101
 
Strategie di testing: Spring Boot loves Kotlin
Strategie di testing: Spring Boot loves KotlinStrategie di testing: Spring Boot loves Kotlin
Strategie di testing: Spring Boot loves Kotlin
 
Automation test
Automation testAutomation test
Automation test
 
The art of being an agile programmer
The art of being an agile programmerThe art of being an agile programmer
The art of being an agile programmer
 
Automation is Easy! (python version)
Automation is Easy! (python version)Automation is Easy! (python version)
Automation is Easy! (python version)
 
Refactoring code in .net
Refactoring code in .netRefactoring code in .net
Refactoring code in .net
 
Postman: An Introduction for Developers
Postman: An Introduction for DevelopersPostman: An Introduction for Developers
Postman: An Introduction for Developers
 
TDD for joomla extensions
TDD for joomla extensionsTDD for joomla extensions
TDD for joomla extensions
 
Play framework - Bristol Java meetup
Play framework - Bristol Java meetupPlay framework - Bristol Java meetup
Play framework - Bristol Java meetup
 
Composer manager module for Drupal
Composer manager module for DrupalComposer manager module for Drupal
Composer manager module for Drupal
 
Why Embrace "Html5"?
Why Embrace "Html5"?Why Embrace "Html5"?
Why Embrace "Html5"?
 
Drupal Performance
Drupal Performance Drupal Performance
Drupal Performance
 
JavaSkop - Automation Skopje
JavaSkop - Automation SkopjeJavaSkop - Automation Skopje
JavaSkop - Automation Skopje
 
Agile Serbia: Exploratory Testing Explained and Experienced
Agile Serbia: Exploratory Testing Explained and ExperiencedAgile Serbia: Exploratory Testing Explained and Experienced
Agile Serbia: Exploratory Testing Explained and Experienced
 

Ähnlich wie Debugging and Magento

Today’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docxToday’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docx
edwardmarivel
 
Unit Testing Best Practices
Unit Testing Best PracticesUnit Testing Best Practices
Unit Testing Best Practices
Tomaš Maconko
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
Duy Tan Geek
 

Ähnlich wie Debugging and Magento (20)

Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and When
 
Database development unit test with tSQLt
Database development unit test with tSQLtDatabase development unit test with tSQLt
Database development unit test with tSQLt
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and When
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
Helping Programmers Write Better Tests
Helping Programmers Write Better TestsHelping Programmers Write Better Tests
Helping Programmers Write Better Tests
 
Today’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docxToday’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docx
 
Monufacture: Effortless Test Data for MongoDB
Monufacture: Effortless Test Data for MongoDBMonufacture: Effortless Test Data for MongoDB
Monufacture: Effortless Test Data for MongoDB
 
Fuel Good 2018: Upgrades Made Easy: The Canadian Museum of History
Fuel Good 2018: Upgrades Made Easy: The Canadian Museum of HistoryFuel Good 2018: Upgrades Made Easy: The Canadian Museum of History
Fuel Good 2018: Upgrades Made Easy: The Canadian Museum of History
 
Unit Testing Best Practices
Unit Testing Best PracticesUnit Testing Best Practices
Unit Testing Best Practices
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
 
Shifting is more than shifting left
Shifting is more than shifting leftShifting is more than shifting left
Shifting is more than shifting left
 
Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023
 
ICST/NEXTA2020: Experience Report on Test Automation Process Improvement
ICST/NEXTA2020: Experience Report on Test Automation Process ImprovementICST/NEXTA2020: Experience Report on Test Automation Process Improvement
ICST/NEXTA2020: Experience Report on Test Automation Process Improvement
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP Developers
 
Surviving the hype cycle Shortcuts to split testing success
Surviving the hype cycle   Shortcuts to split testing successSurviving the hype cycle   Shortcuts to split testing success
Surviving the hype cycle Shortcuts to split testing success
 
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
 
Alm with tfs 2013
Alm with tfs 2013Alm with tfs 2013
Alm with tfs 2013
 
iPullRank Webinar - Automated Testing For SEO With Hamlet Batista
iPullRank Webinar - Automated Testing For SEO With Hamlet BatistaiPullRank Webinar - Automated Testing For SEO With Hamlet Batista
iPullRank Webinar - Automated Testing For SEO With Hamlet Batista
 
BA World Boston: Evening the Odds with Monte Carlo Project Forecasting
BA World Boston: Evening the Odds with Monte Carlo Project ForecastingBA World Boston: Evening the Odds with Monte Carlo Project Forecasting
BA World Boston: Evening the Odds with Monte Carlo Project Forecasting
 
Code Review
Code ReviewCode Review
Code Review
 

Kürzlich hochgeladen

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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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...
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Debugging and Magento