
Tips on how to to debug your WordPress code
04/17/23 • 38 min
On today's episode, Aurooba manufactures a little bug in her code and then Brian helps debug what's going on. As they debug the code, they discuss the high level approach to debugging, some helpful WordPress tools to make finding problems easier, and discuss the role coding standards can have in helping you debug better.
A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter to hear about episodes (and more) first!
Query Monitor – https://en-ca.wordpress.org/plugins/query-monitor/
Using either option or options in ACF – https://www.advancedcustomfields.com/resources/get_field/#get-a-value-from-different-objects
The code from this episode – https://github.com/viewSourcePodcast/viewSource-blocks/blob/debug-episode/functions.php
Brian's website – https://www.briancoords.com
Aurooba's website – https://aurooba.com
viewSource Newsletter – https://viewsource.fm/subscribe
- (00:00) - Introduction
- (02:55) - How do you debug?
- (08:16) - Live debugging a little problem
- (09:10) - Giving context for the bug
- (11:13) - Using Query Monitor
- (14:48) - Talking through the problem
- (16:51) - Adding conditionals appropriately
- (19:09) - Debugging a functional logic error
- (19:44) - Let's var_dump()!
- (25:50) - Thinking about what should happen
- (32:37) - Providing code feedback
- (33:54) - Being more verbose in your code
- (34:24) - Naming variables better
- (35:43) - Choosing the right kind of conditionals
- (37:34) - Conclusion
On today's episode, Aurooba manufactures a little bug in her code and then Brian helps debug what's going on. As they debug the code, they discuss the high level approach to debugging, some helpful WordPress tools to make finding problems easier, and discuss the role coding standards can have in helping you debug better.
A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter to hear about episodes (and more) first!
Query Monitor – https://en-ca.wordpress.org/plugins/query-monitor/
Using either option or options in ACF – https://www.advancedcustomfields.com/resources/get_field/#get-a-value-from-different-objects
The code from this episode – https://github.com/viewSourcePodcast/viewSource-blocks/blob/debug-episode/functions.php
Brian's website – https://www.briancoords.com
Aurooba's website – https://aurooba.com
viewSource Newsletter – https://viewsource.fm/subscribe
- (00:00) - Introduction
- (02:55) - How do you debug?
- (08:16) - Live debugging a little problem
- (09:10) - Giving context for the bug
- (11:13) - Using Query Monitor
- (14:48) - Talking through the problem
- (16:51) - Adding conditionals appropriately
- (19:09) - Debugging a functional logic error
- (19:44) - Let's var_dump()!
- (25:50) - Thinking about what should happen
- (32:37) - Providing code feedback
- (33:54) - Being more verbose in your code
- (34:24) - Naming variables better
- (35:43) - Choosing the right kind of conditionals
- (37:34) - Conclusion
Previous Episode

Reusable Components in React
Aurooba and Brian convert their simple React accordion into separate, reusable components and discuss the importance of components as foundational parts of the web. Next, they show how to use React devtools in Chrome to quickly examine and debug your components. Finally, they dig into the code with a focus on passing and destructuring the data you pass via props.
A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter to hear about episodes (and more) first!
- Code from this episode
- React Developer Tools
- Brian's website – https://www.briancoords.com
- Aurooba's website – https://aurooba.com
- (00:00) - Introduction
- (01:19) - Components as foundational parts of the web
- (03:33) - Recap of our series so far
- (04:15) - Using React devtools in Chrome
- (08:31) - Our AccordionItem Component
- (13:32) - Passing props and destructuring
- (19:20) - How many components is too many?
- (23:46) - Balancing and planning different approaches in React
- (26:48) - What comes next? A preview on state and interactivity
Next Episode

Transitioning from ACF Flexible Content Fields to ACF Blocks
In this episode, Aurooba and Brian discuss his recent recent experience speaking at WordCamp Phoenix. Then, they dig into the presentation topic: transitioning from Advanced Custom Fields Flexible Content Rows to ACF Blocks. The conversation ranges from what it takes to learn a new workflow to understanding the limitations of the block editor.
A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter to hear about episodes (and more) first!
- Brian's WCPHX Talk (with slides and code) - https://www.briancoords.com/phoenix/
- WordCamp Phoenix Livestreams https://www.youtube.com/@wcphx/streams
- Let’s Build a Custom Block in 15 Minutes by Nick Diego - https://nickdiego.com/wcus-2022/
- Brian's website – https://www.briancoords.com
- Aurooba's website – https://aurooba.com
00:00:00 Our First WordCamps
00:04:20 Brian spoke at WordCamp Phoenix
00:08:33 Our histories with ACF
00:09:24 The age of shortcodes is over. The time of the flexible content rows has come.
00:11:02 Transitioning and staying profitable
00:13:54 Live-coding a presentation
00:16:03 Looking at a standard ACF Flexible Content Rows page
00:19:04 ACF Blocks on the frontend
00:20:51 ACF Blocks in the Block Editor
00:24:10 Experimenting with Core Blocks and ACF Blocks
00:30:07 On writing the same code for the rest of your life
00:32:18 Transitioning from ACF Blocks to native blocks
- (00:00) - Our First WordCamps
- (04:20) - Brian spoke at WordCamp Phoenix
- (08:33) - Our histories with ACF
- (09:24) - The age of shortcodes is over. The time of the flexible content rows has come.
- (11:02) - Transitioning and staying profitable
- (13:54) - Live-coding a presentation
- (16:03) - Looking at a standard ACF Flexible Content Rows page
- (19:04) - ACF Blocks on the frontend
- (20:51) - ACF Blocks in the Block Editor
- (24:10) - Experimenting with Core Blocks and ACF Blocks
- (30:07) - On writing the same code for the rest of your life
- (32:18) - Transitioning from ACF Blocks to native blocks
If you like this episode you’ll love
Episode Comments
Generate a badge
Get a badge for your website that links back to this episode
<a href="https://goodpods.com/podcasts/viewsource-254249/tips-on-how-to-to-debug-your-wordpress-code-29577230"> <img src="https://storage.googleapis.com/goodpods-images-bucket/badges/generic-badge-1.svg" alt="listen to tips on how to to debug your wordpress code on goodpods" style="width: 225px" /> </a>
Copy