tools for inspecting and debugging - wordcamp phoenix #wcphx
DESCRIPTION
Slides from my talk at WordCamp Phoenix 2013 on tools for inspecting and debugging.TRANSCRIPT
Inspecting, Development, and Testing ToolsWordCamp Phoenix 2013
http://x-team.com Chris Olbekson @chris_olbekson
Friday, January 18, 13
Who am I?
• WordPress Developer at X-Team
• Core Contributor
• Support Forum Moderator
http://x-team.com Chris Olbekson @chris_olbekson
Chris Olbekson
Friday, January 18, 13
What am I talking about?
http://x-team.com
Tools and methods you can use for testing and debugging your code followed by interactive examples.
Chris Olbekson @chris_olbekson
Friday, January 18, 13
1. WP_DEBUG
define( WP_DEBUG, true)
2. SCRIPT_DEBUG
define(SCRIPT_DEBUG, true)
3. SAVEQUERIES
define(SAVEQUERIES, true)
4. The ALL Action Hook
add_action( 'all', create_function( '', 'var_dump( current_filter() );' )
Built in Tools
http://x-team.com Chris Olbekson @chris_olbekson
Friday, January 18, 13
Plugins
http://x-team.com
• Debug Bar
• Debug Bar Console
• Debug Cron
• Core Control
Chris Olbekson @chris_olbekson
Friday, January 18, 13
Xdebug
http://x-team.com
• Backtraces function calls and variables
• Profiling
• Formatting error messages
• xdebug_vardump
Chris Olbekson @chris_olbekson
Friday, January 18, 13
PHP_CodeSniffer
http://x-team.com
• Detects violations of a defined coding standard
• Essential development tool for teams
• Prevents and detects common semantic errors
• WordPress specific sniffs and rulesethttps://github.com/x-team/WordPress-Coding-Standards
Chris Olbekson @chris_olbekson
Friday, January 18, 13
Using an IDE
http://x-team.com
• Built in function definitions and code completion
• Real time debugging while you write code
• Real time code sniffing with PHPCS
• Built in version control
• Remote debugging with Xdebug
Chris Olbekson @chris_olbekson
Friday, January 18, 13
Start of a Conversation
http://x-team.com Chris Olbekson @chris_olbekson
• KCacheGrind (Visualization / Profiling)
• Unit Testing
• JSHint / JSLint
• Load Testing
What are some of your favorite tools?
Friday, January 18, 13