DEV Community

Cover image for TIL: Gemini can analyze errors directly on the browser
Klaus Kazlauskas
Klaus Kazlauskas

Posted on

TIL: Gemini can analyze errors directly on the browser

So, I was using Chrome's console to debug something today when I noticed a bulb icon on the right side of it saying "Understand this error". I clicked it, accepted the warning message saying the data will be sent to Google, and voila! The error was explained to me.

Here is on app they provide to test: https://bubble-jingle.web.app/search

A screenshot showing a CORS error, which will be explained right after this.

The example app forces a CORS error, and when you click to understand it, it explains what is a CORS error, what is the problem, and some possible solutions.

This feature is called Console Insights, uses Gemini, and it should be on by default if you have Chrome v125 and meets their other requirements. If it is not turned on for you, check their requirements: https://developer.chrome.com/docs/devtools/console/understand-messages

Keep In Mind

On their own article they describe some issues to be aware, like prompt injection and wrong explanations.

Another point is how the data is used. Be sure to only submit data or have the feature on if you agree and trust how they are dealing with it: https://developer.chrome.com/docs/devtools/console/understand-messages#data-use

Conclusion

AI is for sure not perfect and there are many issues around it, but I would love to have something like that when I was beginning. That said, it will for sure make my day-to-day easier (when it doesn't hallucinate).

Top comments (2)

Collapse
 
jacobdavidstern profile image
Jacob Stern

AI can be really helpful when you want direct code feedback, and explaining the error is a great tool when you want to focus on productivity. I find that if I use it to help me understand the error that it improves my learning. Lately, I've tried to work in VS Code using Node, but will give that a go next time.

Collapse
 
klauskpm profile image
Klaus Kazlauskas

100%. I've spent many years just winging it - even more because English is not my main language. That would've had help me for sure.