SlideShare una empresa de Scribd logo
1 de 51
Debugging in Drupal 8
Life After DPM : Creating and Debugging a Module
Allie Jones
Allie Ray Jones | @AllieRays
Review of Resources
Gitbook of Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details
Github Repo of ZRMS and Module: https://github.com/AllieRays/debugging-drupal-8
Demo Site: http://zivte.ch/1Ss473k
Slide Deck: http://zivte.ch/1VxWF60
Zivtech Rocks My Socks
Demo Site
Bear Install Profile Drupal 8 Site
Plan Ahead:
Configuration to avoid frustration
Reduce technical debt
Why is this Important?
Stop ‘Googling’ all of your problems away
(If this blog post doesn’t solve my problem another one will)
● Fix problems & code faster
Stop thinking about debugging after the fact. You should be logically thinking through as you develop.
Overview
Debugging is a Personal Choice. Pick Your Tools.
Drupal Console IDE Xdebug
Continuous
Integration
Zivtech Rocks My Socks ( demo site http://zivte.ch/1Ss47k )
But First, Basic Configuration
Easy / Low Hanging Configuration Options
PHP.ini
Set Error Reporting to Strict: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Display Errors as Html: display_errors = On
Log your errors to a php_error file: log_errors = On || log_errors_max_len = 1024
Easy / Low Hanging Configuration Options
Configuration Settings: Use your setting.local.php.
In setting.php add an include
if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__ . '/settings.local.php';
}
setting.local.php
Show all error messages, with backtrace information.
$config['system.logging']['error_level'] = 'verbose';
Disable CSS and JS aggregation.
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
Easy / Low Hanging Configuration Options
Documentation: https://api.drupal.org/api/drupal/8
Community: StackOverflow, Drupal.StackExchange & Drupal IRC
Change Records: https://www.drupal.org/list-changes/drupal
Change Records:
https://www.drupal.org/list-changes/drupal
Drupal Print Message
The Devel Module provides helper functions to print variables in the browser.
function dpm($input, $name = NULL, $type = 'status') {
if (Drupal::currentUser()->hasPermission('access devel information')) {
$export = kprint_r($input, TRUE, $name);
drupal_set_message($export, $type, TRUE);
}
return $input;
}
What is DPM anyways?
Caching
From the Terminal:
● Drush: drush cr (new as of D8)
● Drupal Console: drupal cache:rebuild
Everyone’s favorite love / hate relationship
From the Browser:
● Admin Ui: /admin/config/development/performance
● Chrome Settings: Disable cache
But Seriously,
Did You
Clear Your Cache?
Easy / Low Hanging Configuration Options
"Log. (Huh) What is it good for. Absolutely ..."
Debugging
/admin/reports/dblog
Devel Module
Drupal 7 Drupal 8
Drupal 8
Devel out of the Box
Devel Submodule: Kint
prettify all the things
“It's var_dump() and
debug_backtrace() on steroids”
print data in a human readable way
backtracing
Devel Submodule: Web Profiler
/admin/config/development/devel/webprofiler
Based on Symfony’s toolbar
Summary toolbar
Resources admin page
Review resource utilization
Cache effectiveness
Database queries
Views
Web Profiler in action
Drupal Console
Built on the Symfony console library
Debug Your Code
drupal routes:debug
drupal router:debug [internal route name]
Clear Cache
drupal router:rebuild
Generate Code
drupal generate:module
drupal generate:controller
drupal generate:entity:config
drupal generate:form
Demo
Zivtech Rocks My Socks (demo site)
Socks Module
Module & Basic Controller:
drupal generate:module
generate:controller
Config Entity : drupal generate:entity:config
Form : drupal generate:form
Let’s Break
Some Things !
Problem:
Class Not Found
PHPStorm
PHP IDE Integrated Development Environment by Jetbrains
Code hinting
Auto completion
Breakpoints
Built in Drupal settings support
Controller Goal: Display a basic page
namespace DrupalsocksController;
use DrupalCoreControllerControllerBase;
class SockController extends ControllerBase {
public function content() {
$sockContent = Drupal::service('socks.sock_content');
$somethings = $sockContent->displaySomethings();
return [
'#type' => 'markup',
'#markup' => t($somethings)
];
}
}
socks.sock_controller_content:
path: 'socks'
defaults:
_controller: 'DrupalsocksControllerSockController::content'
_title: 'All the Socks'
requirements:
_permission: 'access content'
socks/src/Controller/SockController.php socks/socks.routing.yml
Controller
namespace DrupalsocksController;
class SockController extends ControllerBase {
public function content() {
$sockContent = Drupal::service('socks.sock_content');
$somethings = $sockContent->displaySomethings();
return [
'#type' => 'markup',
'#markup' => t($somethings)
];
}
}
Problem Solution
Problem: Accessing
Private and
Protected Methods
Goal: Create a configurable entity type of Sock
namespace DrupalsocksEntity;
use DrupalCoreConfigEntityConfigEntityBase;
class Sock extends ConfigEntityBase {
public $id;
public $uuid;
public $label;
public $description;
public $fabric;
public $rating;
}
socks/Entity/Sock.php
class SockListBuilder extends ConfigEntityListBuilder {
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity->id();
$row['description'] = $entity->description;
$row['fabric'] = $entity->fabric;
$row['rating'] = $entity->rating;
return $row + parent::buildRow($entity);
}
}
socks/src/Controller/SockListBuilder.php
Config Entity
class Sock extends ConfigEntityBase {
/**
* The sock's rating.
* @var string
*/
protected $rating;
}
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity->id();
$row['description'] = $entity->description;
$row['fabric'] = $entity->fabric;
$row['rating'] = $entity->rating;
return $row + parent::buildRow($entity);
}
PROBLEM
Config Entity
SOLUTION
protected $rating;
/**
* @return string
*/
public function getRating() {
return $this->rating;
}
/**
* @param string $rating
*/
public function setRating($rating) {
$this->rating = $rating;
}
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity->id();
$row['description'] = $entity->description;
$row['fabric'] = $entity->fabric;
$row['rating'] = $entity->getRating();
return $row + parent::buildRow($entity);
}
Sock Entity
Sock List Builder
Accessing a protected property by creating methods
Problem:
Syntax Error
Xdebug
Allows script execution to be paused at any point to read through variables
Support stack and execution traces in error messages
Profiling to find performance bottlenecks
https://zivtech.gitbooks.io/zrms/content/xdebug.html admin/reports/status/php
public function submitForm(array &$form, FormStateInterface $form_state) {
$result = $form_state->getValue('fav_sock');
drupal_set_message($this->t('Your favorite sock is @fav_sock',
array('@fav_sock' => $result)));
if ($result == 'Ankle Biters') {
$form_state->setRedirect('socks.knee_highs_controller_content');
}
else {
if ($result == 'Old Fashions') {
$form_state->setRedirect('socks.old_fashions_controller_content');
}
else {
$form_state->setRedirect('socks.knee_highs_controller_content');
}
}
}
Form Goal: Let users pick their favorite sock
class FavoriteSockForm extends FormBase {
public function getFormId() {
return 'favorite_sock_form';
}
public function buildForm(array $form,
FormStateInterface $form_state) {
$form['fav_sock'] = array(
'#type' => 'radios',
'#options' => array(
'Ankle Biters' => $this->t('Ankle Biters'),
'Old Fashions' => $this->t('Old Fashions'),
'Knee Highs' => $this->t('Knee Highs')
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
socks/src/Form/FavoriteSockForm.php
Form
class FavoriteSockForm extends FormBase {
public function getFormId() {
return 'favorite_sock_form';
}
public function buildForm(array $form,
FormStateInterface $form_state) {
$form['fav_sock'] = array(
'#type' => 'radios',
'#options' => array(
'Ankle Biters' => $this->t('Ankle Biters'),
'Old Fashions' => $this->t('Old Fashions'),
'Knee Highs' => $this->t('Knee Highs')
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
public function submitForm(array &$form, FormStateInterface $form_state) {
$result = $form_state['values']['fav_sock'];
drupal_set_message($this->t('Your favorite sock is @fav_sock',
array('@fav_sock' => $result)));
if ($result == 'Ankle Biters') {
$form_state->setRedirect('socks.knee_highs_controller_content');
}
else {
if ($result == 'Old Fashions') {
$form_state->setRedirect('socks.old_fashions_controller_content');
}
else {
$form_state->setRedirect('socks.knee_highs_controller_content');
}
}
}
socks/src/Form/FavoriteSockForm.php
Xdebug
$form_state->getValue is an object,
but the code is trying to access it as if it were an array.
Change $form_state['values']['fav_sock'] to $form_state->getValue('fav_sock')
Debugging and QA does not stop at code
completion.
Problem:
Shared Staging Environment
Client Approval Process
Probo CI
Probo CI creates test environments for each new feature
Visual representation of the project
while development is in progress
with Pull Request builds
Code more confidently &
Speed up approval process
Continuous integration
Probo CI
assets:
- dev.sql.gz
steps:
- name: Example site setup
plugin: Drupal
database: dev.sql.gz
databaseGzipped: true
databaseUpdates: true
revertFeatures: true
clearCaches: true
SOLUTION
https://github.com/AllieRays/debugging-drupal-8/blob/probos/.probo.yaml
Problem:
Cherry Picked
Deployments
PROBLEM
Pull Requests with Probo CI
SOLUTION
https://github.com/AllieRays/debugging-drupal-8/pull/1
https://9365d60b-17fa-4834-bb2b-3bba252a14c6.probo.build/ || zivte.ch/1Ss473k
Gitbook of Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details
Github Repo of ZRMS and Module: https://github.com/AllieRays/debugging-drupal-8
Demo Site: http://zivte.ch/1Ss473k
Slide Deck: http://zivte.ch/1VxWF60
Step 1: Logically think through as you develop.
Step 2: Identify the goal/objective of your code.
Step 3: Identify problem and use appropriate tools to solve your problem.
Step 4: Fix and Test.
Step 5: Test Again.
Step 6: Success!
Review
Gitbook of Configuration Steps:
https://www.gitbook.com/book/zivte
ch/debug-tools-for-drupal8/details
Thank You!

Más contenido relacionado

La actualidad más candente

Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011camp_drupal_ua
 
Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)April Sides
 
Development Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesDevelopment Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesPantheon
 
Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Alex S
 
Drupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinDrupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinADCI Solutions
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalChris Wu
 
Tools and Tips for Moodle Developers - #mootus16
 Tools and Tips for Moodle Developers - #mootus16 Tools and Tips for Moodle Developers - #mootus16
Tools and Tips for Moodle Developers - #mootus16Dan Poltawski
 
How to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentHow to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentAcquia
 
Getting started with drupal 8 code
Getting started with drupal 8 codeGetting started with drupal 8 code
Getting started with drupal 8 codeForum One
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemAcquia
 
uRequire@greecejs: An introduction to http://uRequire.org
uRequire@greecejs: An introduction to http://uRequire.orguRequire@greecejs: An introduction to http://uRequire.org
uRequire@greecejs: An introduction to http://uRequire.orgAgelos Pikoulas
 
Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016Peter Martin
 
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.Samuel Solís Fuentes
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For DummiesKoen Delvaux
 
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the RisksMigrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the RisksAcquia
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP frameworkDinh Pham
 

La actualidad más candente (20)

Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
 
Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
Migrating data to drupal 8
Migrating data to drupal 8Migrating data to drupal 8
Migrating data to drupal 8
 
Development Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesDevelopment Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP Libraries
 
Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014
 
Drupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinDrupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton Shubkin
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
 
Tools and Tips for Moodle Developers - #mootus16
 Tools and Tips for Moodle Developers - #mootus16 Tools and Tips for Moodle Developers - #mootus16
Tools and Tips for Moodle Developers - #mootus16
 
How to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentHow to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of Development
 
Getting started with drupal 8 code
Getting started with drupal 8 codeGetting started with drupal 8 code
Getting started with drupal 8 code
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid Them
 
uRequire@greecejs: An introduction to http://uRequire.org
uRequire@greecejs: An introduction to http://uRequire.orguRequire@greecejs: An introduction to http://uRequire.org
uRequire@greecejs: An introduction to http://uRequire.org
 
Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016
 
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
 
lab56_db
lab56_dblab56_db
lab56_db
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For Dummies
 
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the RisksMigrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP framework
 

Similar a Debugging Drupal 8 Modules and Forms

Drupal vs WordPress
Drupal vs WordPressDrupal vs WordPress
Drupal vs WordPressWalter Ebert
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Siva Epari
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Developmentipsitamishra
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentNuvole
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal DevelopmentJeff Eaton
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8Logan Farr
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?Alexandru Badiu
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal APIAlexandru Badiu
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptDarren Mothersele
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your CodeDrupalDay
 
Drupalcon 2023 - How Drupal builds your pages.pdf
Drupalcon 2023 - How Drupal builds your pages.pdfDrupalcon 2023 - How Drupal builds your pages.pdf
Drupalcon 2023 - How Drupal builds your pages.pdfLuca Lusso
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pagessparkfabrik
 
Doctrine with Symfony - SymfonyCon 2019
Doctrine with Symfony - SymfonyCon 2019Doctrine with Symfony - SymfonyCon 2019
Doctrine with Symfony - SymfonyCon 2019julien pauli
 

Similar a Debugging Drupal 8 Modules and Forms (20)

Drupal vs WordPress
Drupal vs WordPressDrupal vs WordPress
Drupal vs WordPress
 
Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010Drupal Module Development - OSI Days 2010
Drupal Module Development - OSI Days 2010
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Drupal 8 migrate!
Drupal 8 migrate!Drupal 8 migrate!
Drupal 8 migrate!
 
Drupal 8 Hooks
Drupal 8 HooksDrupal 8 Hooks
Drupal 8 Hooks
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8
 
Fatc
FatcFatc
Fatc
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Drupalcon 2023 - How Drupal builds your pages.pdf
Drupalcon 2023 - How Drupal builds your pages.pdfDrupalcon 2023 - How Drupal builds your pages.pdf
Drupalcon 2023 - How Drupal builds your pages.pdf
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
 
Drupal 7 database api
Drupal 7 database api Drupal 7 database api
Drupal 7 database api
 
Doctrine with Symfony - SymfonyCon 2019
Doctrine with Symfony - SymfonyCon 2019Doctrine with Symfony - SymfonyCon 2019
Doctrine with Symfony - SymfonyCon 2019
 

Último

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Debugging Drupal 8 Modules and Forms

  • 1. Debugging in Drupal 8 Life After DPM : Creating and Debugging a Module Allie Jones
  • 2. Allie Ray Jones | @AllieRays
  • 3. Review of Resources Gitbook of Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details Github Repo of ZRMS and Module: https://github.com/AllieRays/debugging-drupal-8 Demo Site: http://zivte.ch/1Ss473k Slide Deck: http://zivte.ch/1VxWF60 Zivtech Rocks My Socks Demo Site Bear Install Profile Drupal 8 Site
  • 4. Plan Ahead: Configuration to avoid frustration Reduce technical debt Why is this Important? Stop ‘Googling’ all of your problems away (If this blog post doesn’t solve my problem another one will) ● Fix problems & code faster Stop thinking about debugging after the fact. You should be logically thinking through as you develop.
  • 5. Overview Debugging is a Personal Choice. Pick Your Tools. Drupal Console IDE Xdebug Continuous Integration
  • 6. Zivtech Rocks My Socks ( demo site http://zivte.ch/1Ss47k )
  • 7. But First, Basic Configuration
  • 8. Easy / Low Hanging Configuration Options PHP.ini Set Error Reporting to Strict: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT Display Errors as Html: display_errors = On Log your errors to a php_error file: log_errors = On || log_errors_max_len = 1024
  • 9. Easy / Low Hanging Configuration Options Configuration Settings: Use your setting.local.php. In setting.php add an include if (file_exists(__DIR__ . '/settings.local.php')) { include __DIR__ . '/settings.local.php'; } setting.local.php Show all error messages, with backtrace information. $config['system.logging']['error_level'] = 'verbose'; Disable CSS and JS aggregation. $config['system.performance']['css']['preprocess'] = FALSE; $config['system.performance']['js']['preprocess'] = FALSE;
  • 10. Easy / Low Hanging Configuration Options Documentation: https://api.drupal.org/api/drupal/8 Community: StackOverflow, Drupal.StackExchange & Drupal IRC Change Records: https://www.drupal.org/list-changes/drupal
  • 12. Drupal Print Message The Devel Module provides helper functions to print variables in the browser. function dpm($input, $name = NULL, $type = 'status') { if (Drupal::currentUser()->hasPermission('access devel information')) { $export = kprint_r($input, TRUE, $name); drupal_set_message($export, $type, TRUE); } return $input; } What is DPM anyways?
  • 13. Caching From the Terminal: ● Drush: drush cr (new as of D8) ● Drupal Console: drupal cache:rebuild Everyone’s favorite love / hate relationship From the Browser: ● Admin Ui: /admin/config/development/performance ● Chrome Settings: Disable cache
  • 15. Easy / Low Hanging Configuration Options "Log. (Huh) What is it good for. Absolutely ..." Debugging /admin/reports/dblog
  • 17. Drupal 8 Devel out of the Box
  • 18. Devel Submodule: Kint prettify all the things “It's var_dump() and debug_backtrace() on steroids” print data in a human readable way backtracing
  • 19. Devel Submodule: Web Profiler /admin/config/development/devel/webprofiler Based on Symfony’s toolbar Summary toolbar Resources admin page Review resource utilization Cache effectiveness Database queries Views
  • 20. Web Profiler in action
  • 21. Drupal Console Built on the Symfony console library Debug Your Code drupal routes:debug drupal router:debug [internal route name] Clear Cache drupal router:rebuild Generate Code drupal generate:module drupal generate:controller drupal generate:entity:config drupal generate:form
  • 22. Demo
  • 23. Zivtech Rocks My Socks (demo site)
  • 25. Module & Basic Controller: drupal generate:module generate:controller
  • 26. Config Entity : drupal generate:entity:config
  • 27. Form : drupal generate:form
  • 30. PHPStorm PHP IDE Integrated Development Environment by Jetbrains Code hinting Auto completion Breakpoints Built in Drupal settings support
  • 31. Controller Goal: Display a basic page namespace DrupalsocksController; use DrupalCoreControllerControllerBase; class SockController extends ControllerBase { public function content() { $sockContent = Drupal::service('socks.sock_content'); $somethings = $sockContent->displaySomethings(); return [ '#type' => 'markup', '#markup' => t($somethings) ]; } } socks.sock_controller_content: path: 'socks' defaults: _controller: 'DrupalsocksControllerSockController::content' _title: 'All the Socks' requirements: _permission: 'access content' socks/src/Controller/SockController.php socks/socks.routing.yml
  • 32. Controller namespace DrupalsocksController; class SockController extends ControllerBase { public function content() { $sockContent = Drupal::service('socks.sock_content'); $somethings = $sockContent->displaySomethings(); return [ '#type' => 'markup', '#markup' => t($somethings) ]; } } Problem Solution
  • 34. Goal: Create a configurable entity type of Sock namespace DrupalsocksEntity; use DrupalCoreConfigEntityConfigEntityBase; class Sock extends ConfigEntityBase { public $id; public $uuid; public $label; public $description; public $fabric; public $rating; } socks/Entity/Sock.php class SockListBuilder extends ConfigEntityListBuilder { public function buildRow(EntityInterface $entity) { $row['id'] = $entity->id(); $row['description'] = $entity->description; $row['fabric'] = $entity->fabric; $row['rating'] = $entity->rating; return $row + parent::buildRow($entity); } } socks/src/Controller/SockListBuilder.php Config Entity
  • 35. class Sock extends ConfigEntityBase { /** * The sock's rating. * @var string */ protected $rating; } public function buildRow(EntityInterface $entity) { $row['id'] = $entity->id(); $row['description'] = $entity->description; $row['fabric'] = $entity->fabric; $row['rating'] = $entity->rating; return $row + parent::buildRow($entity); } PROBLEM Config Entity
  • 36. SOLUTION protected $rating; /** * @return string */ public function getRating() { return $this->rating; } /** * @param string $rating */ public function setRating($rating) { $this->rating = $rating; } public function buildRow(EntityInterface $entity) { $row['id'] = $entity->id(); $row['description'] = $entity->description; $row['fabric'] = $entity->fabric; $row['rating'] = $entity->getRating(); return $row + parent::buildRow($entity); } Sock Entity Sock List Builder Accessing a protected property by creating methods
  • 38. Xdebug Allows script execution to be paused at any point to read through variables Support stack and execution traces in error messages Profiling to find performance bottlenecks https://zivtech.gitbooks.io/zrms/content/xdebug.html admin/reports/status/php
  • 39. public function submitForm(array &$form, FormStateInterface $form_state) { $result = $form_state->getValue('fav_sock'); drupal_set_message($this->t('Your favorite sock is @fav_sock', array('@fav_sock' => $result))); if ($result == 'Ankle Biters') { $form_state->setRedirect('socks.knee_highs_controller_content'); } else { if ($result == 'Old Fashions') { $form_state->setRedirect('socks.old_fashions_controller_content'); } else { $form_state->setRedirect('socks.knee_highs_controller_content'); } } } Form Goal: Let users pick their favorite sock class FavoriteSockForm extends FormBase { public function getFormId() { return 'favorite_sock_form'; } public function buildForm(array $form, FormStateInterface $form_state) { $form['fav_sock'] = array( '#type' => 'radios', '#options' => array( 'Ankle Biters' => $this->t('Ankle Biters'), 'Old Fashions' => $this->t('Old Fashions'), 'Knee Highs' => $this->t('Knee Highs') ), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Submit'), ); return $form; } socks/src/Form/FavoriteSockForm.php
  • 40. Form class FavoriteSockForm extends FormBase { public function getFormId() { return 'favorite_sock_form'; } public function buildForm(array $form, FormStateInterface $form_state) { $form['fav_sock'] = array( '#type' => 'radios', '#options' => array( 'Ankle Biters' => $this->t('Ankle Biters'), 'Old Fashions' => $this->t('Old Fashions'), 'Knee Highs' => $this->t('Knee Highs') ), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Submit'), ); return $form; } public function submitForm(array &$form, FormStateInterface $form_state) { $result = $form_state['values']['fav_sock']; drupal_set_message($this->t('Your favorite sock is @fav_sock', array('@fav_sock' => $result))); if ($result == 'Ankle Biters') { $form_state->setRedirect('socks.knee_highs_controller_content'); } else { if ($result == 'Old Fashions') { $form_state->setRedirect('socks.old_fashions_controller_content'); } else { $form_state->setRedirect('socks.knee_highs_controller_content'); } } } socks/src/Form/FavoriteSockForm.php
  • 41. Xdebug $form_state->getValue is an object, but the code is trying to access it as if it were an array. Change $form_state['values']['fav_sock'] to $form_state->getValue('fav_sock')
  • 42. Debugging and QA does not stop at code completion.
  • 44. Probo CI Probo CI creates test environments for each new feature Visual representation of the project while development is in progress with Pull Request builds Code more confidently & Speed up approval process Continuous integration
  • 45. Probo CI assets: - dev.sql.gz steps: - name: Example site setup plugin: Drupal database: dev.sql.gz databaseGzipped: true databaseUpdates: true revertFeatures: true clearCaches: true SOLUTION https://github.com/AllieRays/debugging-drupal-8/blob/probos/.probo.yaml
  • 48. Pull Requests with Probo CI SOLUTION https://github.com/AllieRays/debugging-drupal-8/pull/1 https://9365d60b-17fa-4834-bb2b-3bba252a14c6.probo.build/ || zivte.ch/1Ss473k
  • 49. Gitbook of Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details Github Repo of ZRMS and Module: https://github.com/AllieRays/debugging-drupal-8 Demo Site: http://zivte.ch/1Ss473k Slide Deck: http://zivte.ch/1VxWF60 Step 1: Logically think through as you develop. Step 2: Identify the goal/objective of your code. Step 3: Identify problem and use appropriate tools to solve your problem. Step 4: Fix and Test. Step 5: Test Again. Step 6: Success! Review
  • 50. Gitbook of Configuration Steps: https://www.gitbook.com/book/zivte ch/debug-tools-for-drupal8/details

Notas del editor

  1. What really interested me about making this presentation was I wanted to stop googling everytime i got error. If we start to think of debuggging as a continuous development process we will code faster, fix problems and reduce technical debt.
  2. these are some of the tools but not all of them debugging is personal. you should get personal with it. it might be more work in the beggning but it will save you hours of development time when you use the right tools for the job.
  3. In order to break and debug we have to have some code right?
  4. The PHP.ini file is the default file for php configuration. You can turn on error reporting and display errors on your local development environment. limits on arrays and object length offers recursion protection limits string length on by default, but is only enabled if php is configured to render errors as html and html errors are off by default. minimize elements WHAT PHP IN IS
  5. Remember when I said debugging is personal? Move settings.local.php to your /sites/default folder Dont add settings.php to your repo
  6. If you have ever looked at the DPM function. It basically says if the user has access to development information print all variables and print it to the message region. Kprint calls krumo. Krumo is a debugging tool (initially PHP4/PHP5, now PHP5 only), which displays structured information about any PHP variable. It is a nice replacement for print_r() or var_dump() which are used by a lot of PHP developers. You can also sees some of the new oop. In drupal 7 you would have seen something like if “user_access” now you can see the currentuser method function dpm($input, $name = NULL, $type = 'status') { if (user_access('access devel information')) { $export = kprint_r($input, TRUE, $name); drupal_set_message($export, $type); } return $input; } Dpm | Dsm
  7. There are a few different ways you can clear your cache From the termianl and your browser In chrome there is also a settings that lets you disable cache while your dev tools are open this is really great when you are doing front end development Promise i won’t talk about caching the entire time.
  8. I think weve all been there right? you know something is working and you think youve cleared your cache but really you just needed to clear your cache again and maybe clear your cache a few more times for safe measure
  9. Drupal 7 DE VEEEEELLLLLLLLLL http://drupal7demo.local/user/1/devel Drupal 8 http://zrms.local/devel/user/1
  10. You are presented with a collapsible trace leading up to your call, you get to see the actual code of each step, the full dump of arguments that were passed, and - if available - the object which contained the method that was called. A backtrace is a report containing a sequence of nested function and method calls to the point where the trace is generated, which gives context to a developer to know what happened. Feeling Better Already but if you take a closer look like krumo Kint is a php dubbing tool.
  11. So the Toolbar is a short summary about the last request. If you click on any of the icons you will get more information. For all the bell and whistle tools you will need to enable third party javascript libraries. http://zrms.local/admin/reports/profiler/view/44a61d#request D\s\C is short for Drupal System Controller hover over to syntax This is great for reverse engineering.
  12. If we go back to the Zivtech What’s your favorite sock Form http://zrms.local/admin/reports/profiler/view/e9bf47#request You can see everything include all of the file pathing even all of the route_params
  13. The reason why we need to have debugging technics setup from the start is because we will be generating so much boilerplate code. The number of files is increasing but that doesn’t necessarily mean increase in complexity. drupal router:debug favorite_sock_form.form Object-oriented programming is a style of coding that allows developers to group similar tasks into classes. Why am I still talking about Routes? Because all pages in drupal 8 will have a route and a controller. If the route is wrong or incorrect your site will break. you can then use the route name as an argument to see more detailed information about each route . once you generate your boilerplate code you can go into each file and add in your customization for example add fields to your forms customize your submit method - like controller what happens when someone submits a form.
  14. In order to break and debug we have to have some code right?
  15. Im just going to breeze over whats in the module and then we will go circle back to go more indepth to each part of the module.
  16. Cmd/Ctrl + click on a method and see the definition idessss Autoloading use statements Look up interfaces.
  17. When a property or method is declared protected, it can only be accessed within the class itself or in descendant classes (classes that extend the class containing the protected method). Declare the getProperty() method as protected in MyClass and try to access it directly from outside the class:
  18. Settings stored in the configuration API
  19. contract: When you implement an interface you are agreeing to abide by the rules that the interface sets up. 5:55 PM You can do more than asked but not less. [5:56 PM] Laurence: And if you meet the expectations of the contract, you are rewarded with stuff that works and hooks up to complicated systems.
  20. Xdebug is a PHP extension was created in 2002 as an alternative to adding a bunch of var dumps and debug backtraces to the code. Configuration: because we are developing inside a virtual machine, they’re a bit tricky to debug with Xdebug which is, by default, tuned for localhost. so i put how I set up xdebug in the configuration gitbook. Setup xdebug with PHPStorm and you'll have your classic breakpoint debugging. Different IDEs will implement xDebug interactions in different ways; but the basic principles will remain the same.
  21. Now that we have an awesome module and we know everyone is going to love our socks it is time to show it to our client
  22. Sometime we have to debug our clients so what are some problems that occur when we need to debug our clients
  23. approve as you work on a feature tease things appart staff section broken and dummy content look on tuesday instead of at the end of sprint checking different things
  24. Probo creates test environments for each new feature as your team develops so that everyone (QA or UAT testers, project managers, developers) can see and interact with development changes earlier and more frequently throughout development without waiting for an environment update. Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. continuous integration feedback super fast more effective and -- something we’ve struggled with so we made this thing open source also a thing instrstructure wjo oauth with github sass services Free to try Probo creates test environments for each new feature as your team develops so that everyone (QA or UAT testers, project managers, developers) can see and interact with development changes earlier and more frequently throughout development without waiting for an environment update.