Chrome DevTools AI Innovations: Agentic Debugging & WebMCP
Explore Chrome DevTools' AI innovations, featuring agentic conversations for faster debugging, structured walkthroughs, and new WebMCP support. Learn to scale your expertise and debug web platform features efficiently.
Introduction

Chrome DevTools now integrates AI innovations, enabling agentic conversations that allow developers to diagnose complex web issues with a single prompt, streamlining debugging workflows. This significantly reduces manual intervention and provides faster, more confident insights into performance and accessibility.
Configuration Checklist
| Element | Version / Link |
|---|---|
| Language / Runtime | JavaScript, CSS, HTML (Web Platform) |
| Main library | Chrome DevTools, Gemini (AI model) |
| Required APIs | Gemini API (for AI assistance) |
| Keys / credentials needed | Google account (for AI Innovations settings) |
Step-by-Step Guide
Step 1 — Enabling AI Innovations in Chrome DevTools
To leverage the new AI capabilities, you must first enable them within DevTools settings. This ensures that features like Console Insights, AI Assistance, Auto Annotations, and Code Suggestions are active.
// Navigate to DevTools Settings
// Click on 'AI Innovations' in the sidebar
// Toggle on 'Console Insights'
// Toggle on 'AI assistance'
// Toggle on 'Auto annotations'
// Toggle on 'Code suggestions'
// [Editor's note: Specific UI elements may vary slightly by Chrome version. Refer to official documentation for precise navigation.]
Step 2 — Initiating Agentic Conversations for Performance Debugging
AI Assistance now supports agentic conversations, allowing you to ask high-level questions about your page's performance. The AI will autonomously perform necessary actions, such as recording a performance trace, to gather context and provide a comprehensive answer.
- Open AI Assistance: Click the shortcut in the top right of DevTools to open the AI Assistance panel in the drawer.
- Ask a performance question: Type your query into the input field.
// Example prompt:
// How can I improve the performance of this page?
- AI performs actions: Gemini in AI Assistance will automatically reload the page and record a performance trace. It then analyzes the trace, focusing on Core Web Vitals (LCP, INP, CLS) and related performance insights.
Step 3 — Stepping Through AI Reasoning with Agent Walkthroughs
To maintain transparency and allow developers to understand the AI's diagnostic process, DevTools provides structured walkthroughs. These walkthroughs display key steps and data points in an easy-to-understand format, with direct links to the relevant DevTools panels.
- Access Agent Walkthrough: After the AI provides its performance analysis, click the "Show agent walkthrough" button.
- Review steps and widgets: A step-by-step walkthrough will open in a split view, showing specialized widgets for:
- LCP breakdown
- Core Web Vitals
- Simplified DOM trees
- First and third-party performance summaries
- Computed styles
- And more.
- Reveal underlying data: Click the "Reveal" button next to any widget to navigate directly to the corresponding data source within DevTools, enabling deeper human investigation.
Step 4 — Leveraging Lighthouse Audits for Accessibility Improvements
AI Assistance can now initiate Lighthouse audits to provide actionable advice on various web development areas, including accessibility. This expands the AI's capability to cover more comprehensive debugging journeys.
- Ask an accessibility question: In the AI Assistance panel, type a query related to accessibility.
// Example prompt:
// How can I improve the accessibility of this page?
- AI performs audit: Gemini in AI Assistance will automatically record a Lighthouse audit for accessibility.
- Receive actionable advice: Based on the Lighthouse audit, the AI will provide specific suggestions to improve the page's accessibility.
Step 5 — Applying AI-Suggested Fixes and Verifying Changes
For certain issues, AI Assistance can suggest and even perform quick fixes directly on the inspected page, and then verify its own changes.
- Request a fix: After receiving accessibility advice (e.g., for color contrast), prompt the AI to fix it.
// Example prompt:
// Please fix the color contrast and verify the fix afterwards.
- AI applies fix: The AI will generate and apply JavaScript code to modify the page's styles.
/* Example CSS change applied by AI */
.font-brand {
color: rgb(0, 85, 204); /* Original blue */
}
/* AI's suggested fix for better contrast */
.font-brand {
color: #0055cc; /* Darker blue for improved contrast */
}
- AI verifies fix: The AI will then re-run a Lighthouse audit to confirm if the fix successfully resolved the issue.
Step 6 — Transferring Debugging Insights to Your Coding Agent
AI Assistance allows you to easily transfer the summarized debugging results and potential fixes to your preferred coding agent or IDE, streamlining the transition from diagnosis to code implementation.
- Generate summary: At the end of any AI conversation, click the "Copy to coding agent" button.
- Copy prompt: A dialog will appear with a summarized prompt, including context, diagnostics, code fixes, and verification results. Click "Copy to clipboard."
- Paste into coding agent: Paste the copied prompt into your favorite coding agent (e.g., Antigravity in VS Code) to let it handle the code changes in your source files.
## Accessibility Audit and Fixes: DevTools Times
**Context**
Analysis and remediation of accessibility issues on the DevTools Times page (`http://localhost:4321/devtools-times/`) to improve the initial accessibility score of 72.
**Diagnostics**
A Lighthouse accessibility audit identified several failing categories:
| Audit Category | Issue Description | Impacted Elements |
|---|---|---|
| **Accessible Names** | Buttons and links lack inner text or ARIA labels, making them unusable for screen readers. | `button.text-gray-700`, `button.p-1`, `a` |
| **Color Contrast** | Text color contrast ratio (2.63:1) is below the required 4.5:1 for standard text. | `div.text-blue-400` |
| **Touch Targets** | Interactive elements have a height of 20px, below the minimum 24px requirement. | Category links (e.g., `Web Development`) |
| **Link Names** | Links in the tab order do not have discernible text or labels. | `div.lg:col-span-2 > a` |
**Code Fixes**
The following CSS adjustment was applied to 12 elements to resolve the contrast ratio failures:
```css
/* Applied to a.text-blue-400 and div.text-blue-400 */
color: #0055cc;
Verification Results
A follow-up audit confirmed that updating the color to #0055cc successfully resolved the "Background and foreground colors do not have a sufficient contrast ratio" audit. Issues regarding accessible names and touch target sizes remain to be addressed in the source code.
Recommendations for Source Code
- Accessible Names: Add
aria-labelattributes to icon-only buttons.- Example:
<button aria-label="Search">...</button>
- Example:
- Touch Targets: Increase the clickable area of links by adding padding.
- Example:
padding: 4px 0;to achieve a minimum 24px height.
- Example:
This is an experimental AI feature and won't always get it right. Double check this text before pasting into another tool.
### Step 7 — Debugging New Web Platform Features with WebMCP
Chrome DevTools continues to support the newest web platform features, including WebMCP, a proposed standard designed to enhance AI agent interaction with websites. This allows developers to debug and build with cutting-edge web technologies as they emerge.
1. **Navigate to WebMCP tools**: Open the Application panel in DevTools.
2. **Select WebMCP**: In the sidebar, select "WebMCP" under the "Background Services" section.
3. **Inspect and invoke tools**: From here, you can inspect defined tools, track their invocations, or manually invoke them to debug results without going through an agent.
## Comparison Tables

### Conversation Style
| Feature | Turn-based | Agentic |
|---|---|---|
| Interaction | One prompt, one answer; sequential | Single prompt, multiple autonomous actions and responses |
| Complexity | Suitable for simple, direct questions | Handles complex, multi-step debugging scenarios |
| User Intervention | High, user guides each step | Low, AI performs actions and reasoning independently |
| Efficiency | Slower for complex tasks | Faster for complex tasks |
### AI Assistance Response Length
| Metric | Before | Now |
|---|---|---|
| Average word count reduction | N/A | 68% |
| Conciseness | More verbose, detailed text | Shorter, more actionable insights |
| Time to action | Longer | Quicker |
## ⚠️ Common Mistakes & Pitfalls
1. **Inaccurate AI responses**: Generative AI features may provide inaccurate or offensive information. Always double-check the AI's suggestions and generated code before implementing them.
2. **Data privacy concerns**: Be aware that relevant data from your inspected page is sent to Google when using AI Innovations. Understand Google's Terms of Service and Privacy Policy, as your organization may have specific data collection policies.
3. **Limited AI scope**: AI Assistance is context-aware but cannot help with all topics (e.g., personal suggestions like dinner plans). It focuses on web development issues related to the inspected page and DevTools data.
4. **Over-reliance on AI**: While powerful, AI is a tool. Developers should still understand the underlying reasoning and be able to manually verify and replicate AI-suggested steps, especially for critical fixes.
## Glossary
**Agentic conversations**: AI-powered interactions where the AI can autonomously perform multiple steps and actions based on a single prompt, rather than requiring turn-by-turn instructions.
**Core Web Vitals**: A set of real-world, user-centered metrics that quantify key aspects of the user experience on the web, including Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS).
**WebMCP**: (Web Machine Comprehension Protocol) A proposed web standard that enables websites to provide AI agents visiting them with specialized tools, allowing for more streamlined and efficient interaction between AI and web content.
## Key Takeaways
* Chrome DevTools' AI Innovations, powered by Gemini, offer agentic conversations for more efficient debugging.
* AI Assistance can now autonomously record performance traces and run Lighthouse audits to answer high-level debugging questions.
* Structured walkthroughs provide transparency into the AI's reasoning, displaying key steps and data in an easy-to-understand format with direct links to DevTools panels.
* AI responses are significantly more concise, with an average 68% reduction in word count, to help developers get to action faster.
* AI Assistance has expanded access to DevTools' panels and sources, enabling it to answer a broader range of web development questions, including accessibility.
* The "Copy for your coding agent" feature allows seamless transfer of AI-generated insights and fixes to external coding agents or IDEs.
* DevTools now supports debugging for new web platform features like WebMCP, View Transitions, `@starting-style`, CSS Carousels, `corner-shape`, and Masonry.
* WebMCP is a proposed web standard that allows websites to expose specialized tools to AI agents, facilitating more efficient AI interaction.
## Resources
* [Chrome DevTools Documentation](https://developer.chrome.com/docs/devtools/)
* [Google I/O Sessions](https://io.google/2024/)
* [Build your website for the agentic era (Google I/O session by Kasper Kulikowski)](https://io.google/2024/program/build-your-website-for-the-agentic-era/)
* [WebMCP Explainer (GitHub)](https://github.com/WICG/web-machine-comprehension-protocol/blob/main/explainer.md)
* [Google Gemini](https://gemini.google.com/)
* [Antigravity (VS Code Extension)](https://github.com/google/antigravity)