Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial - Debugging in WordPress #1574

Closed
15 tasks done
jonathanbossenger opened this issue May 23, 2023 · 6 comments
Closed
15 tasks done

Tutorial - Debugging in WordPress #1574

jonathanbossenger opened this issue May 23, 2023 · 6 comments
Assignees

Comments

@jonathanbossenger
Copy link
Collaborator

jonathanbossenger commented May 23, 2023

Topic Description

When developing WordPress plugins or themes, it's a good idea to have tools in place to help improve your code quality and debug your code in the case of errors. Enabling error logs, inspecting the values of variables during code execution, and looking at the database queries being run are all tools that developers can use to find and fix problems. In this workshop, we'll dive into some of the options built into WordPress that you have at your disposal, learn about various debugging plugins and their uses, as well as look at one or two third-party tools to consider.

Related Resources

Links to related content on Learn, HelpHub, DevHub, GitHub Gutenberg Issues, DevNotes, etc.

  • [ ]

Guidelines

Review the team guidelines

Tutorial Development Checklist

  • Vetted by instructional designers for content idea
  • Provide feedback of the idea
  • Gather links to Support and Developer Docs
  • Review any related material on Learn
  • Define several SEO keywords to use in the article and where they should be prominently used
  • Description and Objectives finalized
  • Tutorial created and announced to the team for Q/A review
  • Tutorial reviewed and ready to publish
  • Tutorial submitted and published to WPTV
  • Tutorial published on WPTV
  • Tutorial captioned
  • Tutorial created on Learn.WordPress.org
  • Tutorial post reviewed for grammar, spelling, etc.
  • Tutorial published on Learn.WordPress.org
  • Tutorial announced to Marketing Team for promotion
@jonathanbossenger
Copy link
Collaborator Author

WIP Script: https://github.com/jonathanbossenger/wp-content/blob/main/tutorials/debugging-wordpress.md

Please leave any review feedback in the comments on this issue.

@jessecowens
Copy link

Learning Objectives
Upon completion of this lesson the participant will be able to:

  • Describe how the 3 debug constants configure PHP to set error reporting, display errors, and define the log file.
  • Use the error_log function to add information to the log file.
  • Set the SAVEQUERIES constant and print the wpdb->queries array to the error log.
  • Name and describe two popular plugins that assist with debugging WordPress.

Content Feedback

  • It may not be useful for this audience to direct attention to wp-load.php, it may be sufficient to simply describe what the constants do to PHP settings.
  • You mention two errors in the script, only one is shown.

Grammar nitpicks

In this tutorial, you're going to learn how about debugging in WordPress.

...display_errors PHP ini setting to 1, which means turn on displaying these errors on screen.

...For example, if you wanted to log a sqlSQL query being run g to the debug.log file

@jonathanbossenger
Copy link
Collaborator Author

jonathanbossenger commented Jun 21, 2023

Thanks, for the review feedback on the script @jessecowens. I need to review it after recording the tutorial and will make the necessary changes.

@jonathanbossenger
Copy link
Collaborator Author

debugging-in-wordpress.mp4

Uploading the tutorial video for review.

Note to the reviewer, I had some weird audio glitches on this tutorial that I've not experienced before. So at some points, my voice cuts out for a split second.

I'm hoping it's not too jarring and we can leave the audio in, but if you find sections that are not super clear, please leave the timestamp in your review, and I'll try and re-record those audio portions.

@jonathanbossenger jonathanbossenger added [Dev] Needs Review Pull request needing a review. Ready for Review and removed [Dev] Needs Review Pull request needing a review. Draft in Progress labels Jun 21, 2023
@westnz
Copy link
Collaborator

westnz commented Jun 26, 2023

Hey Jonathan

Nicely done - you maintained an easy-to-follow pace and explained everything step-by-step.

It might be worth adding something to the blank screen (3:39 -3:58) to make it clear that the page will be empty.

I think it would be best to re-record those sections where you experienced some glitches. Tbh, it is a bit jarring 😬 I will send you some timestamps I jotted down.

@jonathanbossenger
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📜 Published or Closed
Development

No branches or pull requests

4 participants