[HN Gopher] Chrome DevTools now uses Gemini to help with JavaScr...
       ___________________________________________________________________
        
       Chrome DevTools now uses Gemini to help with JavaScript Errors in
       the console
        
       Author : ssahoo
       Score  : 50 points
       Date   : 2024-05-17 20:25 UTC (2 hours ago)
        
 (HTM) web link (developer.chrome.com)
 (TXT) w3m dump (developer.chrome.com)
        
       | ssahoo wrote:
       | 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."
        
         | buildbot wrote:
         | 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...
        
           | matt123456789 wrote:
           | 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...
        
       | mebazaa wrote:
       | Is this a first for Chrome DevTools to have features that require
       | a Google account?
        
         | Andrex wrote:
         | That's a good point.
         | 
         | Syncing DevTools settings likely requires it, but otherwise,
         | not sure and not a great direction to go in IMO.
        
         | paulirish wrote:
         | 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
        
       | hwbunny wrote:
       | Will it untangle heavily obfuscated code?
        
       | akira2501 wrote:
       | 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.
        
       | beeboobaa3 wrote:
       | 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?
        
         | hoten wrote:
         | It does use some page context, including related code:
         | 
         | "related source code"
         | https://developer.chrome.com/docs/devtools/console/understan...
        
       | beeboobaa3 wrote:
       | I can't wait for end users to submit bug reports containing
       | Geminis interpretation instead of the actual error message.
        
         | halfjoking wrote:
         | 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.
        
           | baw-bag wrote:
           | 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.
        
       | Osmose wrote:
       | 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.
        
         | jraph wrote:
         | 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.
        
           | rishab_kokate wrote:
           | 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.
        
         | ajross wrote:
         | 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"?
        
           | olliej wrote:
           | 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!"
        
             | ajross wrote:
             | 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.
        
             | MrDarcy wrote:
             | > 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?
        
         | hu3 wrote:
         | DevTools can't force frameworks and libraries to output better
         | error messages.
         | 
         | But it can help us humans understand them better.
        
       | daft_pink wrote:
       | Seems like a positive thing generally as it will likely to tell
       | you the common issue behind your console error.
        
       | sublinear wrote:
       | 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?
        
         | dullcrisp wrote:
         | 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.
        
         | ajross wrote:
         | 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.
        
       | darkvertex wrote:
       | Edge did it first: https://learn.microsoft.com/en-us/microsoft-
       | edge/devtools-gu...
        
       | wiseowise wrote:
       | Another reason to ditch Chr*me.
        
       | jraph wrote:
       | > 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.
        
       | bhhaskin wrote:
       | 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.
        
       | olliej wrote:
       | So now Google wants to have access to content developers are
       | working on before it's even public is what I'm hearing?
        
       ___________________________________________________________________
       (page generated 2024-05-17 23:00 UTC)