Save 37% off PRO during our Black Friday Sale! »

Ivelina Dimova - The Magic of Advanced Debugging

Ivelina Dimova - The Magic of Advanced Debugging

As lead of the Ongoing Client Support at CrowdFavorite I’ve worked with lots of legacy code on different projects. This session covers some of the lessons we’ve learned in the process and tips how to deal with the most common issues faster and more effective. It also shows how the legacy code can be actually fun.

A717e9d055b2284e573b2412e32f5397?s=128

WordPress Greek Community

December 09, 2017
Tweet

Transcript

  1. The Magic of Advanced Debugging

  2. None
  3. Work Days

  4. None
  5. Once upon a time

  6. None
  7. None
  8. Where to start

  9. Don’t ever debug on production

  10. Set debug constants

  11. None
  12. None
  13. Fatal error: Cannot use object of type stdClass as array

    in /Users/ivdimova/Sites/project.dev/wordpress/wp-content/plugin s/custom-social-feed/includes/init.php on line 645, referer: http://project.dev/
  14. Invalid argument supplied for foreach() in /Users/ivdimova/Sites/project.dev/wp-includes/plugin.php on line 523

  15. Plugin conflicts?!

  16. Grep all the things grep all the things

  17. var_dump(); error_log(); error_log( print_r( $object, 1 ) );

  18. Query Monitor

  19. None
  20. Xdebug

  21. None
  22. None
  23. None
  24. None
  25. None
  26. Permissions, permissions

  27. Version Control

  28. git log

  29. git blame

  30. None
  31. Identify filters and hooks

  32. add_action( 'plugins_loaded', 'prefix_remove_action', 10 ); function prefix_remove_action() { $invoice =

    new WC_Gateway_Sprout_Invoices(); $result = remove_action( 'woocommerce_thankyou_sprout_invoices', array( $invoice, 'thankyou_page' ), 20 ); }
  33. None
  34. None
  35. None
  36. Leave legacy for others

  37. None
  38. Contact: iv.dimova@gmail.com @iv_wp https://www.linkedin.com/in/ivdimova