Shining a Light on Debugging
Lessons from a Lightbulb
Alex Riviere
Senior Vue Developer at Nexcor Food Safety Management
@fimion@notacult.social
The Lightbulb
Photo by Jack Carter on Unsplash
Step 1:
The Light Bulb is Out
- Identify your bug, and be able to reproduce it consistently.
- Use a stack trace to pinpoint where the error is coming from
Step 2:
Swap Out the Light Bulb
- Find a working example
- Write a Test
- Create a controlled environment
Step 2.5:
Test the Original Light Bulb in a Different Lamp
- Find a way to check the original data
- Use a debugger to check assumptions
- Print/log your data to test your assumptions
Step 3:
Test the Lamp in a Different Power Source
- Make sure the data source is returning the correct data
- Write an integration test
Step 4:
Check the Plug
- Check that you are using the right resource
- Check the documentation
Step 4.5:
Test a Different Lamp in the Original Socket
- Create a minimal reproduction of the issue
- Isolating an issue can help pinpoint where the problem is.
Step 5:
Check the Breaker Box
- Check your package versions
- Make sure you are using the correct documentation for your version
- Check release notes to see if the issue has already been fixed in a newer version
Step 6:
Call in an Expert or Use Specialized Tools
- Ask someone more senior for help
- Call in a consultant
- Contribute upstream to an open source project
Step 7:
Troubleshoot
the Opaque Wall Wiring
- Dig into an open source project and learn how to contribute to it
- Contact the maintainer of a closed source library with a bug report
Step 8:
Check for Larger Issues,
Like a Power Outage
- Check for a system outage
- Look and see if the service has a status page
Step 8.5:
Call the Power Company
- See if you have an SLA, and request updates on when the service will be available
- If it's a smaller service, file a support ticket to make sure they are aware of the situation
Step 9:
Flip the Table
- Run into the woods
- Become a farmer
...Okay, maybe don't do these
Step 10:
Remember to tell
the wifi lightbulb
to turn on.
You have a typo on line 85.
Thank you
Alex Riviere
@fimion@notacult.social
https://alex.party
Shining a Light on Debugging - StirTrek 2024
By Alex Riviere
Shining a Light on Debugging - StirTrek 2024
- 215