When I have bugs or issues, I turn to GenAI tools nowadays. However they couldn’t one-shot producing a solution yet.
I tried a prompt shared by Ted Werbl and it turned out to be very useful.

This is the full prompt.
Stuck trying to debug something in Cursor? Try this magical prompt 🪄
— Ted Werbel (@tedx_ai) February 17, 2025
"Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions before we move onto implementing the actual code fix"… pic.twitter.com/zboO34sFiL
What happened?
I use Hugo for this site. I got this error when I tried to add a cover to a post.
ERROR couldn’t find resource for src: static/images/mass-delete-posts-in-meta-business-suite.png
The tool recommended adding a snippet of code for debugging:
{{- errorf “couldn’t find resource for src: %s. Current page path: %s. Available resources: %+v” $path .Page.Path .Page.Resources -}}
I was able to identify the directory that I should store the image quickly.