E1 · Find the 404
5 minRun the first block. Open kit/site/index.html and find the line that asks for the missing file.
Done when: node devtools.mjs → erros no console: 2 · requisições: 3 · com falha: 1 and saída: 1.
Lesson 3 · 15 min
When the agent says "I couldn't do it," the answer is usually in the console or the network: a file that returned 404, a JavaScript error. Chrome DevTools MCP gives the agent the same tabs you open with F12. In this lesson you list the console and the network of the kit page, find the planted error, and bring it to zero.
Start the lesson
Goal: use Chrome DevTools MCP to see the console and network of the page the agent opened, find the error, and bring it to zero in a fixed copy.
Click each block.
The page looks right. The console and the network show that a file is missing.
One acts, the other investigates.
Fill in, click, and wait using the accessibility tree, with refs. Playwright MCP also lists console and network (browser_console_messages, browser_network_requests), but its strength is the task.
Console with levels, every request with its status, performance traces, and Lighthouse. It's the server to ask "why did it fail?".
Both can stay connected to the same agent: lesson 2's configurar.mjs already wrote both into .mcp.json.
Telemetry: by default the server sends usage statistics to Google and sends performance trace URLs to the CrUX API. The kit turns this off with --no-usage-statistics and --no-performance-crux.
Every page tool needs a pageId (get it from list_pages). With Playwright's Chromium, pass --chromeArg=--no-sandbox, which is the Playwright default; without it the browser closes with "Target closed".
Version 1.11.0 came out on 10/15/2026, according to the npm registry, and was not tested here. The server itself warns "Update available"; the kit stays on 1.10.1 until the next capture.
devtools.mjs opens the kit's home page and lists the console and network. The fix runs on a copy, without touching the kit.
cd ~/projetos/formacao-webmcp-navegador-v72/kit node devtools.mjs; echo "saída: $?"
cd ~/projetos/formacao-webmcp-navegador-v72/kit
E=${TMPDIR:-/tmp}/kit3-aula3; rm -rf "$E"; cp -r site "$E"
echo '{"texto": "Revisão básica com 10% de desconto em novembro."}' > "$E/promocoes.json"
SITE="$E" node devtools.mjs; echo "saída: $?"→ navigate_page {"url":"http://127.0.0.1:PORTA/","pageId":1}
→ list_console_messages {"pageId":1}
[error] Failed to load resource: the server responded with a status of 404 (Not Found)
[error] promoções: falha ao carregar promocoes.json (HTTP 404)
→ list_network_requests {"pageId":1}
GET http://127.0.0.1:PORTA/ [200]
GET http://127.0.0.1:PORTA/estilo.css [200]
GET http://127.0.0.1:PORTA/promocoes.json [404]
erros no console: 2 · requisições: 3 · com falha: 1
saída: 1Two console errors (the browser's 404 and the page's own message) and one failed request. On screen, the page only says "Sem promoções no momento".
→ navigate_page {"url":"http://127.0.0.1:PORTA/","pageId":1}
→ list_console_messages {"pageId":1}
→ list_network_requests {"pageId":1}
GET http://127.0.0.1:PORTA/ [200]
GET http://127.0.0.1:PORTA/estilo.css [200]
GET http://127.0.0.1:PORTA/promocoes.json [200]
erros no console: 0 · requisições: 3 · com falha: 0
saída: 0The SITE variable swaps the served folder for the copy in /tmp/kit3-aula3, which has the promocoes.json. Zero errors, zero failures, exit 0.
The kit's error and your site. Each exercise has a "done when".
Run the first block. Open kit/site/index.html and find the line that asks for the missing file.
Done when: node devtools.mjs → erros no console: 2 · requisições: 3 · com falha: 1 and saída: 1.
Run the second block. Then change the text in the copy's promocoes.json and check that the page shows the new text.
Done when: the second block (SITE="$E" node devtools.mjs, with E=/tmp/kit3-aula3) → erros no console: 0 · requisições: 3 · com falha: 0 and saída: 0.
Run devtools.mjs with the address of one of your sites. For each error, note whether an agent would lose anything because of it.
Done when: node devtools.mjs with your site's address → line erros no console: N · requisições: M · com falha: F, with N and F written down.
Question 1 of 4
The page shows "Sem promoções no momento" and looks normal. Where does the agent find out something broke?skill
Question 2 of 4
Why does the kit pass --no-usage-statistics and --no-performance-crux to Chrome DevTools MCP?skill
Question 3 of 4
The server refused the console call, saying the pageId is missing. What do you do?
Question 4 of 4
Which server do you turn on so the agent can fill in and submit a form?
Pick an option. The explanation appears after you answer.