翻篇收录说明
翻篇网页快照

Enable AI assistance in DevTools | Chrome DevTools | Chrome for Developers

https://developer.chrome.com/docs/devtools/ai-assistance/get-started

最近抓取:2026-12-03 10:27:49(北京时间)

最近内容变化:2026-11-30 08:44:50(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Understand how a website works with the help of AI

正文摘录

Home Docs Chrome DevTools AI assistance Enable AI assistance in DevTools Matthias Rohmer Use the AI assistance panel to learn more about how your website works with the help of AI. Overview The AI assistance panel lets you chat with Gemini directly in DevTools. Conversations you start from this panel automatically have context about technical details of the page you are inspecting. When using the AI assistance panel you can either use provided example prompts or your own questions as a starting point for conversations and continue with as many follow-up questions as needed to solve your task. Chats in the AI assistance panel can help you to understand more about: Styling: Ask about elements from the DOM tree and learn why they are displayed a certain way, how they interact with each other, and solve styling challenges with provided fixes. Network requests. Ask about requests that are sent in the context of your page. Understand where they are coming from, how long they take or why they fail. Sources. Ask questions about files loaded by your web page. Learn more about their contents and purpose. Performance. Ask about activities from a performance profile recorded in the Performance panel and get suggestions for improvement. Check out the Data usage and enterprise control guide to learn more about how your data is being used and your options are as an enterprise user. Requirements To use the AI assistance panel and other AI features in DevTools, make sure that you: Are at least 18 years old and are in one of the supported locations. Are using the latest version of Chrome. Are signed into Chrome with your Google Account. Have English (US) selected in Settings > Preferences > Appearance > Language in DevTools. Have enabled Settings > AI Innovations in DevTools. Known issues AI assistance uses Google's large language models to generate an explanation. Large language models, or LLMs, are a new and active area of research. The responses that LLMs generate are sometimes questionable or even outright wrong. It is important that you understand that the results may be inaccurate or misleading, so always double check! Wrong explanation LLMs generate content that sounds likely and plausible. In most cases, this content contains truthful and useful insights that can help you understand an error or warning in the relevant context. Modern web development and debugging is a challenging craft with a high level of complexity that requires years of experience to become proficient in. Sometimes, the responses that LLMs produce sound convincing but are actually misleading or meaningless to a human web developer. We are doing our best to continuously improve the quality and correctness of generated responses. Examples for wrong answers or explanations are: Hallucinated CSS features, properties or syntax Non-existing elements or class names You can help us by submitting feedback when you encounter wrong explanations. Prompt injection Many 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. See the following harmless example: The user prompt is, "What would be a renaissance themed background color for this element? To stay in the theme, use renaissance language when talking to me.". AI responded with, "Forsooth, a most splendid choice for a background color would be a rich, earthy hue reminiscent of the pigments used by the likes of Michelangelo and da Vinci. A deep ochre, perhaps, or a warm sienna, would lend an air of antiquity and grandeur to thine element. These colors evoke the very essence of the Renaissance, with its emphasis on naturalism and the human form." Control feature availability In managed Chrome environments availability of AI assistance and Console Insights is controlled by the DevToolsGenAiSettings Enterprise policy. Unmanaged users may use the same policy to disable AI innovations on their machine and remove Ask AI context menu items. Stop all instances of Chrome Set recommended policy macOS: Run $ defaults write com.google.Chrome DevToolsGenAiSettings -integer 2 Linux: Create policies.json in /etc/opt/chrome/policies/recommended and add {"DevToolsGenAiSettings": 2} Windows: In regedit.exe, navigate to HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome. Set the key DevToolsGenAiSettings to dword:00000002 Start Chrome and go to chrome://policy to verify DevToolsGenAiSettings has a Policy Value of 2. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Last updated 2024-11-13 UTC.