SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
XDebug -> PHPStorm
XDebug Integration to PHP Storm
What is XDebug ?

•  is a PHP extension that was written
• 
• 

and is maintained by Derick
Rethans
provides debugging and profiling
capabilities
you can set a breakpoint and pause
the execution of a script
What is XDebug ?

•  use to avoid var_dump, print_r
and echo for debugging

•  completely replaces the need to litter
your code with echo, print_r() or
var_dump() calls, and displays
information on all variables, not just
the one you passed.
IDE Support

•  PHP Storm
•  Sublime Text 2
•  Notepad++
•  Vim
Installation
Ubuntu
sudo apt-get install php5-dev php-pear
Install xdebug thru PECL
o  sudo pecl install xdebug
Then edit php.in add:
o  zend_extension="/usr/lib/php5/20060613/xdebug.so"
o  [xdebug]
o  xdebug.file_link_format="txmt://open?url=file://
%f&line=%1"
o  xdebug.remote_enable = On
o  xdebug.remote_autostart = 1

• 
• 
• 

• 

restart apache : sudo /etc/init.d/apache2 restart
Installation
Ubuntu

•  xdebug.profiler_̲enable  =  1
xdebug.profiler_̲output_̲name  =  xdebug.out.%t
xdebug.profiler_̲output_̲dir  =  /tmp

• 

xdebug.profiler_̲enable_̲trigger  =  1
restart apache : sudo /etc/init.d/apache2 restart
Installation
Mac (Using precompiled binaries)
cd /tmp/
curl http://xdebug.org/files/xdebug-2.2.1.tgz >
xdebug.tgz
tar -xvzf xdebug.tgz
cd xdebug-2.2.1
phpize
./configure
make
make install

• 
• 
• 
• 
• 
• 
• 
• 
Installation
Mac (Using precompiled binaries)

•  on php.ini add the following line:

o  zend_extension="/usr/lib/php5/20060613/xdebug.so"
o  [xdebug]
o  xdebug.file_link_format="txmt://open?
url=file://%f&line=%1"
o  xdebug.remote_enable = On
o  xdebug.remote_autostart = 1

•  Restart Apache
Installation
Windows

•  Download appropriate xdebug version in
http://xdebug.org/download.php
•  Save the .dll file to apache/modules folder
•  On php.ini add the following lines

• 

o  zend_extension="path/to/xdebug.dll"
o  [xdebug]
o  xdebug.remote_enable = On
o  xdebug.remote_autostart = 1
Restart Apache
Implement Xdebug to Php Storm
• 
• 

Application -> Preferences -> PHP -> Debug -> DBGP Proxy
Set Port to 9000 is recommended
Install XDebug Helper
• 

• 

https://chrome.google.com/webstore/search/xdebug

Once you’ve installed the extension, right click the little bug appearing in
your address bar and go to the options.
Install XDebug Helper
• 
• 

Set IDE key to PHPSTORM
Set Domain Filter *.local
Install XDebug Helper
• 
• 

After configuring right click the icon on your address bar
Click Debug
Start XDebug Session
•  Click the “Start Listen PHP Debug Connections” button:
•  add breakpoints by clicking the space next to the line
numbers on the left hand side
Implement Xdebug to Php Storm
• 

If everything goes according to plan, this window should pop up inside of
PhpStorm to inform you of an incoming debug connection:
Tools
• 
• 
• 
• 
• 

Resume Program (F9) — Clicking on this green arrow
allows script execution to proceed to next breakpoint if you
have any more, or to end of script as it normally would.
Stop (CTRL + F2) — Immediately halts script execution.
Step Over (F8) — Goes to the next PHP line in current file.
Does not go into method calls made within current context.
Step Into (F7) — Goes to the next PHP line in current
execution, not just the file. Dives into any method calls made,
giving far more detail than Step Over.
Step Out - If you stepped into a function and want to get out
before the end is reached, just step out.
Tools
•  Variables — Displays all available variables, including
objects, arrays or simple variables, at the current breakpoint.

• 
• 

Editing Variable - You can edit variables without reloading
the page.
Run to Cursor - Run the specific line where the cursor is
located.
Profiling
•  Tools -> Analyze XDebug Profiler Snapshot
• 

Locate the file that used in config
a.  ex. /tmp/xdebug.out.1385202363
XDebug -> Sublime Text2
XDebug Integration to Sublime Text2
Download XDebug Plugin
•  Install Package Control
a.  https://sublime.wbond.net/installation
b.  control + ~
c.  Paste the python code to console

• 
• 
• 
• 

Open Package Manager (Command + Shift + p)
Type Install Package
Look for Kindari/SublimeXdebug
On XDebug Helper for IDE Key
a.  sublime.xdebug
Sublime XDebug Shortcut
Keys
•  Shift+f8: Open XDebug quick panel
• 
• 
• 
• 
• 
• 

f8: Open XDebug control quick panel when debugger is
connected
Ctrl+f8: Toggle breakpoint
Ctrl+Shift+f5: Run to next breakpoint
Ctrl+Shift+f6: Step over
Ctrl+Shift+f7: Step into
Ctrl+Shift+f8: Step out

Mais conteúdo relacionado

Mais procurados

Final opensource record 2019
Final opensource record 2019Final opensource record 2019
Final opensource record 2019Karthik Sekhar
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)Robert Swisher
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flaskjuzten
 
Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Combell NV
 
Debugging, Monitoring and Profiling in TYPO3
Debugging, Monitoring and Profiling in TYPO3Debugging, Monitoring and Profiling in TYPO3
Debugging, Monitoring and Profiling in TYPO3AOE
 
Pwning with powershell
Pwning with powershellPwning with powershell
Pwning with powershelljaredhaight
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...Vincenzo Barone
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsAdam Culp
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 
The typo3.org Relaunch Project
The typo3.org Relaunch ProjectThe typo3.org Relaunch Project
The typo3.org Relaunch ProjectAOE
 
PM : code faster
PM : code fasterPM : code faster
PM : code fasterPHPPRO
 
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
Philipp Von Weitershausen   Plone Age  Mammoths, Sabers And Caveen   Cant The...Philipp Von Weitershausen   Plone Age  Mammoths, Sabers And Caveen   Cant The...
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...Vincenzo Barone
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using PythonAyun Park
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Vincenzo Barone
 

Mais procurados (20)

Final opensource record 2019
Final opensource record 2019Final opensource record 2019
Final opensource record 2019
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
Xdebug from a to x
Xdebug from a to xXdebug from a to x
Xdebug from a to x
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
 
Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11
 
Debugging, Monitoring and Profiling in TYPO3
Debugging, Monitoring and Profiling in TYPO3Debugging, Monitoring and Profiling in TYPO3
Debugging, Monitoring and Profiling in TYPO3
 
Pwning with powershell
Pwning with powershellPwning with powershell
Pwning with powershell
 
Php Power Tools
Php Power ToolsPhp Power Tools
Php Power Tools
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl Programmer
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
The typo3.org Relaunch Project
The typo3.org Relaunch ProjectThe typo3.org Relaunch Project
The typo3.org Relaunch Project
 
PM : code faster
PM : code fasterPM : code faster
PM : code faster
 
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
Philipp Von Weitershausen   Plone Age  Mammoths, Sabers And Caveen   Cant The...Philipp Von Weitershausen   Plone Age  Mammoths, Sabers And Caveen   Cant The...
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using Python
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
 
Php intro
Php introPhp intro
Php intro
 

Destaque

Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in YiiIlPeach
 
Vertical Rhythm and Modular Scale: Typesettings
Vertical Rhythm and Modular Scale: TypesettingsVertical Rhythm and Modular Scale: Typesettings
Vertical Rhythm and Modular Scale: TypesettingsIan Rose
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in YiiIlPeach
 
Imágenes para los evangelios del curso 2015-2016
Imágenes para los evangelios del curso 2015-2016Imágenes para los evangelios del curso 2015-2016
Imágenes para los evangelios del curso 2015-2016Norka C. Risso Espinoza
 
Powerpoint coneixement del medi pablo blasco
Powerpoint coneixement del medi   pablo blascoPowerpoint coneixement del medi   pablo blasco
Powerpoint coneixement del medi pablo blascoPablo Blasco
 
torre de papel y carton
torre de papel y cartontorre de papel y carton
torre de papel y carton06121996
 
Diari del 14 de maig de 2015
Diari del 14 de maig de 2015Diari del 14 de maig de 2015
Diari del 14 de maig de 2015diarimes
 
54 ozel
54 ozel54 ozel
54 ozeltmder
 
Bitcoin meetup Paralelní Polis - O stavebních kamenech
Bitcoin meetup Paralelní Polis - O stavebních kamenechBitcoin meetup Paralelní Polis - O stavebních kamenech
Bitcoin meetup Paralelní Polis - O stavebních kamenechMartin Šíp
 
25 sayings grammar practice
25 sayings grammar practice25 sayings grammar practice
25 sayings grammar practiceBrett Vaden
 
Bakshanam kazhikkumpol orkkenda sunnathukal
Bakshanam kazhikkumpol orkkenda sunnathukal Bakshanam kazhikkumpol orkkenda sunnathukal
Bakshanam kazhikkumpol orkkenda sunnathukal shabeel pn
 
Dich web anh an 2
Dich web anh an 2Dich web anh an 2
Dich web anh an 2upa098
 
noble praxis tipps - telefon- und webkonferenzen
noble praxis tipps - telefon- und webkonferenzennoble praxis tipps - telefon- und webkonferenzen
noble praxis tipps - telefon- und webkonferenzennoble kommunikation
 
Geo Sol About Geo Thermal
Geo Sol  About Geo ThermalGeo Sol  About Geo Thermal
Geo Sol About Geo ThermalKnut Linke
 

Destaque (20)

Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Presentation
PresentationPresentation
Presentation
 
Vertical Rhythm and Modular Scale: Typesettings
Vertical Rhythm and Modular Scale: TypesettingsVertical Rhythm and Modular Scale: Typesettings
Vertical Rhythm and Modular Scale: Typesettings
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
 
Vertical rhythm
Vertical rhythm Vertical rhythm
Vertical rhythm
 
Imágenes para los evangelios del curso 2015-2016
Imágenes para los evangelios del curso 2015-2016Imágenes para los evangelios del curso 2015-2016
Imágenes para los evangelios del curso 2015-2016
 
Empresas ecológicas
Empresas ecológicasEmpresas ecológicas
Empresas ecológicas
 
Powerpoint coneixement del medi pablo blasco
Powerpoint coneixement del medi   pablo blascoPowerpoint coneixement del medi   pablo blasco
Powerpoint coneixement del medi pablo blasco
 
torre de papel y carton
torre de papel y cartontorre de papel y carton
torre de papel y carton
 
Diari del 14 de maig de 2015
Diari del 14 de maig de 2015Diari del 14 de maig de 2015
Diari del 14 de maig de 2015
 
54 ozel
54 ozel54 ozel
54 ozel
 
Bitcoin meetup Paralelní Polis - O stavebních kamenech
Bitcoin meetup Paralelní Polis - O stavebních kamenechBitcoin meetup Paralelní Polis - O stavebních kamenech
Bitcoin meetup Paralelní Polis - O stavebních kamenech
 
25 sayings grammar practice
25 sayings grammar practice25 sayings grammar practice
25 sayings grammar practice
 
Evaluacion y formulacion de proyectos
Evaluacion y formulacion de proyectosEvaluacion y formulacion de proyectos
Evaluacion y formulacion de proyectos
 
La justicia
La justiciaLa justicia
La justicia
 
Bakshanam kazhikkumpol orkkenda sunnathukal
Bakshanam kazhikkumpol orkkenda sunnathukal Bakshanam kazhikkumpol orkkenda sunnathukal
Bakshanam kazhikkumpol orkkenda sunnathukal
 
Dich web anh an 2
Dich web anh an 2Dich web anh an 2
Dich web anh an 2
 
noble praxis tipps - telefon- und webkonferenzen
noble praxis tipps - telefon- und webkonferenzennoble praxis tipps - telefon- und webkonferenzen
noble praxis tipps - telefon- und webkonferenzen
 
Book drive Flyer
Book drive FlyerBook drive Flyer
Book drive Flyer
 
Geo Sol About Geo Thermal
Geo Sol  About Geo ThermalGeo Sol  About Geo Thermal
Geo Sol About Geo Thermal
 

Semelhante a X-Debug in Php Storm

IPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHopIPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHopSteve Kamerman
 
Php through the eyes of a hoster
Php through the eyes of a hosterPhp through the eyes of a hoster
Php through the eyes of a hosterCombell NV
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8Wim Godden
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPtutorialsruby
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPtutorialsruby
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbaivibrantuser
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slidesmattboehm
 
Code Igniter Code Sniffer
Code Igniter  Code SnifferCode Igniter  Code Sniffer
Code Igniter Code SnifferAlbert Rosa
 
Debugging and Profiling PHP Applications
Debugging and Profiling PHP ApplicationsDebugging and Profiling PHP Applications
Debugging and Profiling PHP ApplicationsLogan Lindquist
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsDECK36
 
Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10Combell NV
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13DanWooster1
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshopjulien pauli
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4Max Kleiner
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshopjulien pauli
 
Php tutorial from_beginner_to_master
Php tutorial from_beginner_to_masterPhp tutorial from_beginner_to_master
Php tutorial from_beginner_to_masterPrinceGuru MS
 

Semelhante a X-Debug in Php Storm (20)

Php
PhpPhp
Php
 
Php ppt
Php pptPhp ppt
Php ppt
 
IPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHopIPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHop
 
Php through the eyes of a hoster
Php through the eyes of a hosterPhp through the eyes of a hoster
Php through the eyes of a hoster
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHP
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHP
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slides
 
Code Igniter Code Sniffer
Code Igniter  Code SnifferCode Igniter  Code Sniffer
Code Igniter Code Sniffer
 
Debugging and Profiling PHP Applications
Debugging and Profiling PHP ApplicationsDebugging and Profiling PHP Applications
Debugging and Profiling PHP Applications
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshop
 
Php tutorial from_beginner_to_master
Php tutorial from_beginner_to_masterPhp tutorial from_beginner_to_master
Php tutorial from_beginner_to_master
 

Mais de KLabCyscorpions-TechBlog (13)

Object Calisthenics in Objective-C
Object Calisthenics in Objective-CObject Calisthenics in Objective-C
Object Calisthenics in Objective-C
 
Auto Layout on Xcode 5
Auto Layout on Xcode 5Auto Layout on Xcode 5
Auto Layout on Xcode 5
 
Code Review for iOS
Code Review for iOSCode Review for iOS
Code Review for iOS
 
Object Calisthenics
Object CalisthenicsObject Calisthenics
Object Calisthenics
 
Why You're A Bad PHP Programmer
Why You're A Bad PHP ProgrammerWhy You're A Bad PHP Programmer
Why You're A Bad PHP Programmer
 
Redis Set Go
Redis Set GoRedis Set Go
Redis Set Go
 
Redis Beyond
Redis BeyondRedis Beyond
Redis Beyond
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Php + MySql Optimization
Php + MySql OptimizationPhp + MySql Optimization
Php + MySql Optimization
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
MVC Web Application
MVC Web ApplicationMVC Web Application
MVC Web Application
 
AfNetworking vs. Native + Caching
AfNetworking vs. Native + CachingAfNetworking vs. Native + Caching
AfNetworking vs. Native + Caching
 
Bash
BashBash
Bash
 

Último

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Último (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

X-Debug in Php Storm

  • 1. XDebug -> PHPStorm XDebug Integration to PHP Storm
  • 2. What is XDebug ? •  is a PHP extension that was written •  •  and is maintained by Derick Rethans provides debugging and profiling capabilities you can set a breakpoint and pause the execution of a script
  • 3. What is XDebug ? •  use to avoid var_dump, print_r and echo for debugging •  completely replaces the need to litter your code with echo, print_r() or var_dump() calls, and displays information on all variables, not just the one you passed.
  • 4. IDE Support •  PHP Storm •  Sublime Text 2 •  Notepad++ •  Vim
  • 5. Installation Ubuntu sudo apt-get install php5-dev php-pear Install xdebug thru PECL o  sudo pecl install xdebug Then edit php.in add: o  zend_extension="/usr/lib/php5/20060613/xdebug.so" o  [xdebug] o  xdebug.file_link_format="txmt://open?url=file:// %f&line=%1" o  xdebug.remote_enable = On o  xdebug.remote_autostart = 1 •  •  •  •  restart apache : sudo /etc/init.d/apache2 restart
  • 6. Installation Ubuntu •  xdebug.profiler_̲enable  =  1 xdebug.profiler_̲output_̲name  =  xdebug.out.%t xdebug.profiler_̲output_̲dir  =  /tmp •  xdebug.profiler_̲enable_̲trigger  =  1 restart apache : sudo /etc/init.d/apache2 restart
  • 7. Installation Mac (Using precompiled binaries) cd /tmp/ curl http://xdebug.org/files/xdebug-2.2.1.tgz > xdebug.tgz tar -xvzf xdebug.tgz cd xdebug-2.2.1 phpize ./configure make make install •  •  •  •  •  •  •  • 
  • 8. Installation Mac (Using precompiled binaries) •  on php.ini add the following line: o  zend_extension="/usr/lib/php5/20060613/xdebug.so" o  [xdebug] o  xdebug.file_link_format="txmt://open? url=file://%f&line=%1" o  xdebug.remote_enable = On o  xdebug.remote_autostart = 1 •  Restart Apache
  • 9. Installation Windows •  Download appropriate xdebug version in http://xdebug.org/download.php •  Save the .dll file to apache/modules folder •  On php.ini add the following lines •  o  zend_extension="path/to/xdebug.dll" o  [xdebug] o  xdebug.remote_enable = On o  xdebug.remote_autostart = 1 Restart Apache
  • 10. Implement Xdebug to Php Storm •  •  Application -> Preferences -> PHP -> Debug -> DBGP Proxy Set Port to 9000 is recommended
  • 11. Install XDebug Helper •  •  https://chrome.google.com/webstore/search/xdebug Once you’ve installed the extension, right click the little bug appearing in your address bar and go to the options.
  • 12. Install XDebug Helper •  •  Set IDE key to PHPSTORM Set Domain Filter *.local
  • 13. Install XDebug Helper •  •  After configuring right click the icon on your address bar Click Debug
  • 14. Start XDebug Session •  Click the “Start Listen PHP Debug Connections” button: •  add breakpoints by clicking the space next to the line numbers on the left hand side
  • 15. Implement Xdebug to Php Storm •  If everything goes according to plan, this window should pop up inside of PhpStorm to inform you of an incoming debug connection:
  • 16. Tools •  •  •  •  •  Resume Program (F9) — Clicking on this green arrow allows script execution to proceed to next breakpoint if you have any more, or to end of script as it normally would. Stop (CTRL + F2) — Immediately halts script execution. Step Over (F8) — Goes to the next PHP line in current file. Does not go into method calls made within current context. Step Into (F7) — Goes to the next PHP line in current execution, not just the file. Dives into any method calls made, giving far more detail than Step Over. Step Out - If you stepped into a function and want to get out before the end is reached, just step out.
  • 17. Tools •  Variables — Displays all available variables, including objects, arrays or simple variables, at the current breakpoint. •  •  Editing Variable - You can edit variables without reloading the page. Run to Cursor - Run the specific line where the cursor is located.
  • 18. Profiling •  Tools -> Analyze XDebug Profiler Snapshot •  Locate the file that used in config a.  ex. /tmp/xdebug.out.1385202363
  • 19. XDebug -> Sublime Text2 XDebug Integration to Sublime Text2
  • 20. Download XDebug Plugin •  Install Package Control a.  https://sublime.wbond.net/installation b.  control + ~ c.  Paste the python code to console •  •  •  •  Open Package Manager (Command + Shift + p) Type Install Package Look for Kindari/SublimeXdebug On XDebug Helper for IDE Key a.  sublime.xdebug
  • 21. Sublime XDebug Shortcut Keys •  Shift+f8: Open XDebug quick panel •  •  •  •  •  •  f8: Open XDebug control quick panel when debugger is connected Ctrl+f8: Toggle breakpoint Ctrl+Shift+f5: Run to next breakpoint Ctrl+Shift+f6: Step over Ctrl+Shift+f7: Step into Ctrl+Shift+f8: Step out