tools for inspecting and debugging - wordcamp phoenix #wcphx

9

Click here to load reader

Upload: chris-olbekson

Post on 08-May-2015

1.266 views

Category:

Technology


2 download

DESCRIPTION

Slides from my talk at WordCamp Phoenix 2013 on tools for inspecting and debugging.

TRANSCRIPT

Page 1: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

Inspecting, Development, and Testing ToolsWordCamp Phoenix 2013

http://x-team.com Chris Olbekson @chris_olbekson

Friday, January 18, 13

Page 2: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

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

Page 3: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

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

Page 4: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

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

Page 5: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

Plugins

http://x-team.com

• Debug Bar

• Debug Bar Console

• Debug Cron

• Core Control

Chris Olbekson @chris_olbekson

Friday, January 18, 13

Page 6: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

Xdebug

http://x-team.com

• Backtraces function calls and variables

• Profiling

• Formatting error messages

• xdebug_vardump

Chris Olbekson @chris_olbekson

Friday, January 18, 13

Page 7: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

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

Page 8: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

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

Page 9: Tools for Inspecting and Debugging - WordCamp Phoenix #wcphx

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