the exterminator s tool belt
play

The Exterminator's Tool Belt: Finding and eliminating bugs without - PowerPoint PPT Presentation

The Exterminator's Tool Belt: Finding and eliminating bugs without staying up all night Allen Shaw (TwoMice) allen@emphanos.com Emphanos LLC, Chicago, IL 1 2 3 4 5 6 7 8 9 10 Examples 1 2 3 4 5 6 7 8 9 10 Examples 1 2 3 4 5 6 7 8


  1. The Exterminator's Tool Belt: Finding and eliminating bugs without staying up all night Allen Shaw (TwoMice) allen@emphanos.com Emphanos LLC, Chicago, IL

  2. 1 2 3 4 5 6 7 8 9 10 Examples

  3. 1 2 3 4 5 6 7 8 9 10 Examples

  4. 1 2 3 4 5 6 7 8 9 10 Examples

  5. 1 2 3 4 5 6 7 8 9 10 Examples

  6. 1 2 3 4 5 6 7 8 9 10 Best practices for debugging 1. Skepticism : 2. Pessimism : 3. Entitlement : 4. Impatience : 5. Laziness : 6. Ruthlessness :

  7. 1 2 3 4 5 6 7 8 9 10 Best practices for debugging 1. Skepticism : There probably isn't a bug. 2. Pessimism : It's probably the user's fault. 3. Entitlement : Surely somebody fixed it already. 4. Impatience : No time to keep testing this bug. 5. Laziness : Do no more than necessary. 6. Ruthlessness : Rip the code apart.

  8. 1 2 3 4 5 6 7 8 9 10 Tools for debugging

  9. 1 2 3 4 5 6 7 8 9 10 CiviCRM debug settings ● Smarty variables: &smartyDebug=1 ● Stack trace: &backtrace=1 ● Session variables: http://bit. ly/civicrm-debug- &sessionDebug=1 settings ● CIVICRM_MAIL_LOG ● CIVICRM_DEBUG_LOG_QUERY ● CIVICRM_DAO_DEBUG

  10. 1 2 3 4 5 6 7 8 9 10 Firebug http://getfirebug.com FireBug: Analyze DOM and network calls, analyze and execute JavaScript, all within the browser. Similar features available natively in Google Chrome.

  11. 1 2 3 4 5 6 7 8 9 10 FirePHP http://firephp.org FirePHP: Send debugging messages to Firebug from PHP.

  12. 1 2 3 4 5 6 7 8 9 10 A good IDE helps. ● NetBeans ● Eclipse ● Others? Quickly navigate through unfamiliar code.

  13. 1 2 3 4 5 6 7 8 9 10 Devel module (Drupal) ● Easily examine variables. ● Limit output via Drupal permissions. http://drupal.org/project/devel

  14. 1 2 3 4 5 6 7 8 9 10 Selenium IDE ● Script the browser to perform the steps necessary to replicate a bug. ● Write regression tests to ensure bugs stay gone. http://seleniumhq.org

  15. 1 2 3 4 5 6 7 8 9 10 Hands on... http://12269.civicon2013.localhost/ http://activities.civicon2013.localhost/ http://12014.civicon2013.localhost/

  16. 1 2 3 4 5 6 7 8 9 10 Thank you, questions welcome. CiviCRM debug settings: http://bit.ly/civicrm-debug- settings Firebug: http://getfirebug.com FirePHP: http://firephp.org NetBeans: https://netbeans.org/ Eclipse: http://www.eclipse.org/ Devel module: http://drupal.org/project/devel Selnium: http://seleniumhq.org Allen Shaw allen@emphanos.com Emphanos LLC, Chicago, IL

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend