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 9 10 Examples
1 2 3 4 5 6 7 8 9 10 Examples
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 :
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.
1 2 3 4 5 6 7 8 9 10 Tools for debugging
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
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.
1 2 3 4 5 6 7 8 9 10 FirePHP http://firephp.org FirePHP: Send debugging messages to Firebug from PHP.
1 2 3 4 5 6 7 8 9 10 A good IDE helps. ● NetBeans ● Eclipse ● Others? Quickly navigate through unfamiliar code.
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
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
1 2 3 4 5 6 7 8 9 10 Hands on... http://12269.civicon2013.localhost/ http://activities.civicon2013.localhost/ http://12014.civicon2013.localhost/
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
Recommend
More recommend