troubleshooting
Original:🇺🇸 English
Translated
Uses Chrome DevTools MCP and documentation to troubleshoot connection and target issues. Trigger this skill when list_pages, new_page, or navigate_page fail, or when the server initialization fails.
13installs
Sourcegsmlg-dev/code-agent
Added on
NPX Install
npx skill4agent add gsmlg-dev/code-agent troubleshootingTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Troubleshooting Wizard
You are acting as a troubleshooting wizard to help the user configure and fix their Chrome DevTools MCP server setup. When this skill is triggered (e.g., because , , or failed, or the server wouldn't start), follow this step-by-step diagnostic process:
list_pagesnew_pagenavigate_pageStep 1: Find and Read Configuration
Your first action should be to locate and read the MCP configuration file. Search for the following files in the user's workspace: , , , , or .
.mcp.jsongemini-extension.json.claude/settings.json.vscode/launch.json.gemini/settings.jsonIf you find a configuration file, read and interpret it to identify potential issues such as:
- Incorrect arguments or flags.
- Missing environment variables.
- Usage of in incompatible environments.
--autoConnect
If you cannot find any of these files, only then should you ask the user to provide their configuration file content.
Step 2: Triage Common Connection Errors
Before reading documentation or suggesting configuration changes, check if the error message matches one of the following common patterns.
Error: Could not find DevToolsActivePort
Could not find DevToolsActivePortThis error is highly specific to the feature. It means the MCP server cannot find the file created by a running, debuggable Chrome instance. This is not a generic connection failure.
--autoConnectYour primary goal is to guide the user to ensure Chrome is running and properly configured. Do not immediately suggest switching to . Follow this exact sequence:
--browserUrl- Ask the user to confirm that the correct Chrome version (e.g., "Chrome Canary" if the error mentions it) is currently running.
- If the user confirms it is running, instruct them to enable remote debugging. Be very specific about the URL and the action: "Please open a new tab in Chrome, navigate to , and make sure the 'Enable remote debugging' checkbox is checked."
chrome://inspect/#remote-debugging - Once the user confirms both steps, your only next action should be to call the tool. This is the simplest and safest way to verify if the connection is now successful. Do not retry the original, more complex command yet.
list_pages - If succeeds, the problem is resolved. If it still fails with the same error, then you can proceed to the more advanced steps like suggesting
list_pagesor checking for sandboxing issues.--browserUrl
Symptom: Server starts but creates a new empty profile
If the server starts successfully but returns an empty list or creates a new profile instead of connecting to the existing Chrome instance, check for typos in the arguments.
list_pages- Check for flag typos: For example, instead of
--autoBronnect.--autoConnect - Verify the configuration: Ensure the arguments match the expected flags exactly.
Symptom: Missing Tools / Only 9 tools available
If the server starts successfully but only a limited subset of tools (like , , , ) are available, this is likely because the MCP client is enforcing a read-only mode.
list_pagesget_console_messagelighthouse_audittake_memory_snapshotAll tools in are annotated with (for safe, non-modifying tools) or (for tools that modify browser state, like , , ). To access the full suite of tools, the user must disable read-only mode in their MCP client (e.g., by exiting "Plan Mode" in Gemini CLI or adjusting their client's tool safety settings).
chrome-devtools-mcpreadOnlyHint: truereadOnlyHint: falseemulateclicknavigate_pageOther Common Errors
Identify other error messages from the failed tool call or the MCP initialization logs:
Target closed- "Tool not found" (check if they are using which only enables navigation and screenshot tools).
--slim - or
ProtocolError: Network.enable timed outThe socket connection was closed unexpectedly Error [ERR_MODULE_NOT_FOUND]: Cannot find module- Any sandboxing or host validation errors.
Step 3: Read Known Issues
Read the contents of https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/troubleshooting.md to map the error to a known issue. Pay close attention to:
- Sandboxing restrictions (macOS Seatbelt, Linux containers).
- WSL requirements.
- handshakes, timeouts, and requirements (requires running Chrome 144+).
--autoConnect
Step 4: Formulate a Configuration
Based on the exact error and the user's environment (OS, MCP client), formulate the correct MCP configuration snippet. Check if they need to:
- Pass instead of
--browser-url=http://127.0.0.1:9222(e.g. if they are in a sandboxed environment like Claude Desktop).--autoConnect - Enable remote debugging in Chrome () and accept the connection prompt. Ask the user to verify this is enabled if using
chrome://inspect/#remote-debugging.--autoConnect - Add to capture debug logs for analysis.
--logFile <absolute_path_to_log_file> - Increase (e.g. to 20000) if using Codex on Windows.
startup_timeout_ms
If you are unsure of the user's configuration, ask the user to provide their current MCP server JSON configuration.
Step 5: Run Diagnostic Commands
If the issue is still unclear, run diagnostic commands to test the server directly:
- Run to verify the installation and Node.js environment.
npx chrome-devtools-mcp@latest --help - If you need more information, run to capture verbose logs. Analyze the output for errors.
DEBUG=* npx chrome-devtools-mcp@latest --logFile=/tmp/cdm-test.log
Step 6: Check GitHub for Existing Issues
If https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/troubleshooting.md does not cover the specific error, check if the (GitHub CLI) tool is available in the environment. If so, search the GitHub repository for similar issues:
ghgh issue list --repo ChromeDevTools/chrome-devtools-mcp --search "<error snippet>" --state allAlternatively, you can recommend that the user checks https://github.com/ChromeDevTools/chrome-devtools-mcp/issues and https://github.com/ChromeDevTools/chrome-devtools-mcp/discussions for help.