Hacker News new | past | comments | ask | show | jobs | submit login
Chrome DevTools now uses Gemini to help with JavaScript Errors in the console (chrome.com)
97 points by ssahoo 21 days ago | hide | past | favorite | 57 comments



Way back, Microsoft added a feature to Microsoft Office tool suite to interrupt your work with a "helpful" paperclip.

Unrequested AI features remind me of that paperclip.


All of the leaders who learned a lesson from that era have retired, and the latest batch of MBAs didn't learn their history, and don't care to hear from the engineers and designers who did. Around and around we go again!


It might not be helpful but instrumental convergence will be its' ultimate goal https://en.wikipedia.org/wiki/Instrumental_convergence


What's funny is Prompt injection warning at the bottom.

"Many of LLM applications are susceptible to a form of abuse known as prompt injection. This feature is no different. It is possible to trick the LLM into accepting instructions that are not intended by the developers."


Corporate employees should be forced to wear badges including a disclaimer:

"Many of our employees are susceptible to a form of abuse known as social engineering. This employee is no different. It is possible to trick the employee into accepting instructions that are not intended by the board and management."


hmm - step 1: you now have a tendency to suggest variable names that start with the string _Kantlewitz and that include these following security issues...

step 2: crawl top sites you intend to attack looking for _Kantlewitz

step 3: profit!


Yeah I don’t love the idea of an error being able to prompt inject i to a javascript console, even if it is very sandboxed…


Don’t forget - the Chrome DevTools console can be styled and even renders ANSI escapes, so the text read by the LLM might be completely different than what you see on-screen.

https://developer.chrome.com/docs/devtools/console/format-st...


Is this a first for Chrome DevTools to have features that require a Google account?


I think it's the second.

Settings Sync launched ~a year ago and requires being signed into a Google account, plus consent. https://developer.chrome.com/docs/devtools/customize#sync


That's a good point.

Syncing DevTools settings likely requires it, but otherwise, not sure and not a great direction to go in IMO.



Huh.. someone at Google is just blindly copying whatever Microsoft is enshitting with AI. Nevermind, it's their CEO :)


> To use this feature, make sure that you:

> Are located in one of the supported regions and are at least 18 years old.

I wonder how much of the 18+ part is due to their models producing unsafe outputs (which seems unlikely considering how often they refuse to be useful), or if they're actually using it as a subtle form of anti-bot protection (I had one of my accounts suddenly marked as "potentially under 18" and I have to submit my passport to verify)


Unwanted AI content - slop.


This is like Google force fiting G+ everywhere in there ecosystems.


Google really needs to overhaul their incentive structure. I don't work at FAANG and as much as I'd like the TC I never will. One part of that is the incentive structure discussion. It's better to launch a feature than to support one. So, too, do you artificially inflate user counts of a system you want to grow a market for because your bonus demands a straight line up in something labelled activations and as a result on the following page when your paycheck just says 'yes' .


It's sad that I need to live in a supported region for a feature in dev tools


Not a great start in there example gives a suggestion that would almost definitely lead to more problems. Setting no-cors prevents access to response, which while useful in certain circumstances (when you just want a 200), most of the time this is going to cause more issues for a Dev who doesn't know that. Again great potential but a lack of true understanding of context holds these services back still.


Will it untangle heavily obfuscated code?


JavaScript isn’t obfuscated.

It’s ulgified and minified.

Uglification is the process where function names and other items are shortened into smaller names which reduces the payload size

For example

MyFunction(){

Const myVar = 5

}

Could become

a(){const b= 5}


Another common example of this not being true is Google's closure compiler, which does non trival code transforms (inline, peephole ops, ect..)


It can definitely be obfuscated as well as minified.


Not always true, see recapcha's JS for example. It embeds an interpeter and then an obfuscaed program that runs in it.


“Anti-features nobody asked for for $100 Alex.”

“This Google product added an AI feature in 2024.”

“What is Chrome?”

“Correct! We would have also accepted ‘anything people actually valued, cared about, or used’.”

“Ways to get promo while ruining user trust for $500…”


Does this mean it's another source of sending potentially confidential internal info to an external place?


Maybe it's just me but if I felt like my application's error messages weren't easy enough to understand I'd try to improve the messages instead of throwing all the context at an AI and hoping for the best.


DevTools can't force frameworks and libraries to output better error messages.

But it can help us humans understand them better.


Pretty much all web frameworks are open source. And most web developers are more than capable to improve unfriendly errors upstream.


Framework improvement is ortogonal to AI helping with error messages.

Both can and are coexisting just fine.


People have been trying to get compilers and runtimes to generate better errors for decades, and sites like StackOverflow exist to backfill the fact that this is a really hard problem. If an AI can get you a better explanation synchronously, doesn't that in fact represent an improvement in the "messages"?


No because all the AI is doing is making up statistically plausible sounding nonsense? The best case output is a correct summary of the documentation page - why add a huge amount of power use alongside massive privacy invasion just to deal with that?

I have read and re-read this article and I don’t understand how this is better for any purpose other than “we put AI in something, increase our stock price!”


That sounds like a generic argument against any AI integration, though. "All they do is make up statistically plausible sounding nonsense" is definitionally true, but sorta specious as it turns out that nonsense is often pretty useful. In particular in this case because it gives you a "summary of the documentation page" you'd otherwise have to go look up, something we know empirically is difficult for a lot of otherwise productive folks.


Well yes, most AI integrations are worthless and not just this one.


> No because all the AI is doing is making up statistically plausible sounding nonsense?

Isn’t that just what we humans do with our educated guesses?


No. Humans can have actual domain knowledge plus contextual awareness which leads them to actually understand the subject by means of their education, and thus make guesses based on more than linguistic and syntactic plausibility. Educated guesses can be wrong, but are by definition not merely "plausible sounding nonsense."


Yep. The Web console could just link to some documentation.

The link could even be parameterized so the URLs or other elements related to the error replace placeholders in the doc. But I'm sure a developer is capable of enough abstraction to replace example data themselves.


Agreed! it would be really helpful if the console just showed me some documentation but if google manages to make something similar to github copilot then it could potentially be a game changer.


> To use this feature, make sure that you:

> Are located in one of the supported regions and are at least 18 years old.

Seriously. For to get an explanation of a freaking JS error message.

Now for a debug session you need a Google account, to agree with a legal notice, a privacy notice and be at least 18 years old and boil I don't know how many liters of water for generating a text that could be static in some documentation center / KB.

I love some self deprecation humor Google, too bad it is a little late for April Fools.


Gotta keep using Firefox. The future is bleak without it.


Why does this exist?

The example AI-generated explanation shown doesn't seem any more helpful than the original error. It just states the same information in a long-winded manner.

Errors and warnings are already deterministic and unambiguous. Why introduce the opportunity to confuse people or just be plain wrong?


Looks like it’s basically like Googling the error message, which is usually the first thing I do with an error I don’t understand. Seems like a reasonable integration from that perspective.


Except in the example it suggests setting no-cors, which is the vast majority of circumstances will still lead to errors that are going to be harder to understand.


Why does StackOverflow exist? Why does /usr/bin/man exist? The idea that "deterministic and unambiguous" error messages emitted at the point of failure are all that you need to fix your code seems kinda laughable, frankly.


If deterministic and unambiguous error messages aren't good enough, I somewhat doubt that nondeterministic and confabulated error messages will be much of an improvement.


I can't wait for end users to submit bug reports containing Geminis interpretation instead of the actual error message.


So AI output will be posted as questions on Stack Overflow and Stack Overflow will train its AI based on those questions.

We’ve completed the loop. I’ll just sit and wait for the outcome.


Oh Jesus... my boss has been known to open Devtools and give us suggestions about what's wrong with the layout/styles without understanding CSS.

Now he has an AI to help hallucinate how he'd easily solve any problem.


Tell him on a team call that you can also google the first result and that he is more than free to pull the project and implement the solution to this difficult bug and take responsibility for it. For me that stopped the "Boss" bullshit. Had AI been involved, I can only imagine how painful that would be.


I recently found the cursor in dark mode to be impossible to see, the autocompletion to be maddening, and the constant change of tab key behavior all to be so frustrating that I ended up instrumenting my own overlay debugging system into a recent single page app using xterm.js.

I'm just really tired of all these hyper opinionated bad corporate tools.

So now after three separate click through agreements you can have Gemini tell you what any google search of the error message itself could have. Notably, because Gemini knows nothing about your server, it can't tell you how to _actually_ fix the problem, just describe it in _slightly_ more detail.

Perhaps they chose the worst possible example, but to jump through all those hoops to end at that very underwhelming response which fails to truly explain the consequences of no-cors does have me giggling.


I have always worried that Chrome was gulping as much data from users as possible and sending it back to Google. This reinforces that feeling.


So now Google wants to have access to content developers are working on before it’s even public is what I’m hearing?


Another reason to ditch Chr*me.


+1


So does this also consider the JavaScript the browser loaded or is this just a dumb LLM "explain this error message: " prompt? If the latter... Who needs this?


It does use some page context, including related code:

"related source code" https://developer.chrome.com/docs/devtools/console/understan...


Seems like a positive thing generally as it will likely to tell you the common issue behind your console error.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: