Website debugging tools: what to use when a page breaks

Which tool to open for each kind of website bug: DevTools console and network tab, HAR files, Lighthouse, mobile emulation, and repeatable browser checks.

website debugging toolsdevtoolsdebugging

For a bug you can see right now, open the browser's developer tools. The console is for JavaScript errors, the network panel is for failed requests, and the elements panel is for layout. For a bug you have to hand to someone else, save a HAR file and screenshots, and strip cookies and tokens out of the HAR before you send it. For a bug that comes back after a deploy, turn the steps into a check you can run again.

This page is the map. Reading and fixing a JavaScript error is how to fix JavaScript errors. Opening the tools in Safari is how to open the Safari console. Saving and opening a HAR is how to save a Chrome HAR file and how to open a HAR file.

Pick the tool by the symptom

What you seeWhat to open
Blank page, or a button that does nothingConsole
Data never loads, or a form failsNetwork
Layout is wrongElements, then the device toolbar
The page is slowPerformance, then Lighthouse
It only breaks in SafariWeb Inspector
Someone else has to fix itHAR, screenshots, and a written report

Blank page, or a button that does nothing

Open the console and repeat the click. A red error is the first fact. TypeError, ReferenceError, and a failed script load are the usual ones. The stack frame in your file is the line to open. If the console is empty, the button's handler did not run, or it returned without doing the work. Check the element: is the listener on the node you clicked, or did a layer sit on top of it.

The walkthrough of the common messages, and of try/catch once you know the cause, is how to fix JavaScript errors.

Data does not load, or a form fails

Open the Network panel, turn on Preserve log, and repeat the action. Reload if the list is empty. Requests appear only while the panel is recording.

Read the status before you read the JavaScript:

  • 404 means the URL is wrong or the file is gone. A script 404 means that code never ran.
  • 401 or 403 means the request was not allowed. Check the cookie or the token the request sent. Do not paste that token into a ticket.
  • 500 and other 5xx statuses mean the server threw. The response body is the server's error, when the server included one.
  • CORS error means the browser hid the response. The console names the missing header. The fix is a response header on the server, not a change to the calling function.
  • A pending row that never finishes is a request that hung. The timeout, if you have one, is why the UI stopped.

Click the row for the response body. A JSON error page and an HTML error page look the same in a spinner. They do not look the same in this panel. Preserve log matters when the form navigates: without it, the failed request on the previous document is gone.

Layout is broken

Open the Elements panel (Inspector in Firefox, Elements in the Web Inspector). Select the node that is in the wrong place. The Computed pane shows the size and the position the engine actually used, after the cascade. A rule you think applies and a rule that is crossed out are different facts. The crossed-out one lost.

For a bug that appears only at a phone width, open the device toolbar. In Chrome that is Command-Shift-M on a Mac and Control-Shift-M on Windows and Linux. Set the width you were told, and look again. The toolbar emulates a viewport. It is not a phone, and it is not Safari. A failure that exists only in Safari still needs Safari.

The page is slow

The Performance panel records what the main thread did while you reproduced the slowness: scripting, rendering, and long tasks. Record a few seconds of the slow action, then stop. A long yellow or purple block is the work to read. Guessing from a spinner is slower than reading that recording.

Lighthouse, in the same DevTools, scores a load and lists the audits it ran: render-blocking resources, large images, and the metrics it computed for that load. Run it on the URL you care about, in an incognito window if extensions are adding their own work. A Lighthouse score is one load in one browser. It is not your field data.

Use Performance when a specific interaction is slow. Use Lighthouse when the question is what the load of this URL costs in that browser.

It only breaks in Safari

Chrome's device toolbar will not show it. Open Safari's Web Inspector and read the console and the network list on the page that failed. Developer features are off by default. The steps, including an iPhone attached to a Mac, are how to open the Safari console.

You need to send it to someone

Take a screenshot of the failure, copy the console text, and write the steps from a known starting point. The fields are the bug report template.

A HAR file is the Network log saved to disk. In Chrome: open Network, reproduce, right-click the list, and choose Save all as HAR with content. "With content" includes response bodies. The file can contain cookies, Authorization headers, and tokens. Delete those before you put the file in a ticket or a chat. Opening it later is how to open a HAR file. The capture steps are how to save a Chrome HAR file.

Developer tools in each browser

Chrome DevTools. F12 or Control-Shift-I opens the last panel on Windows and Linux. Command-Option-I does that on a Mac. Command-Option-J (Control-Shift-J otherwise) opens the Console. Command-Shift-C (Control-Shift-C otherwise) opens Elements in inspect mode. The same tools are in Edge and other Chromium browsers, with the same shortcuts.

Firefox DevTools. F12 or Control-Shift-I (Command-Option-I on a Mac) opens the toolbox. Control-Shift-K (Command-Option-K on a Mac) opens the console. The Network panel and the Inspector are the same jobs as Chrome's Network and Elements. Names of individual buttons move between versions. The panels do not.

Safari Web Inspector. It stays hidden until Show features for web developers is on, under Safari, Settings, Advanced. Older Safari calls that checkbox Show Develop menu in menu bar. Option-Command-C opens the console after that. Option-Command-I opens the inspector. An iPhone page is inspected from the Mac, not on the phone. How to open the Safari console.

When DevTools is the wrong tool

DevTools shows the tab you have open, while you have it open. Three situations fall outside that.

You were not watching. The failure happened on a deploy overnight, or on a preview you did not click. The console is empty because the page is not in front of you. You need a run that already happened, with the screen and the requests saved.

The bug is one step in a longer flow. A checkout that fails only after a valid address, a coupon, and a signed-in user is tedious to repeat by hand on every change. The steps are stable enough to write down. Repeating them from memory is how a step gets skipped.

It comes back after deploys. You fixed it, it shipped, and a later change brought it back. A note in a ticket does not run. A check that runs on the pull request does.

Repeatable checks with Monito

A Monito check runs a scenario you describe in plain English in desktop Chromium, usually at 1440×900. It returns Passed, Failed, or Error, with screenshots, console messages, and each network request's method, URL, and status from that run. A run with no login also records a video. A run that signs in keeps masked screenshots instead of a recording.

Start it with monito check, as documented in the check command. MCP exposes the same check so a coding agent can run it after a change. CI can run saved scenarios on a pull request. A local dev server can be checked too. Check localhost with Monito.

Error means the check could not verify the scenario. It is not a pass, and it is not automatically a defect. What cannot verify means.

What this run is not: production session replay, real-user monitoring, a HAR export, or a run in Safari, Firefox, or a phone. The console and the requests are from Monito's Chromium. A Safari-only bug still needs the Web Inspector.

What this page does not cover

Real-user monitoring and production session replay are other products. This page does not review them, and it does not rank debugging products. The tools above are the ones built into the browser, plus a check you can run again.

FAQ

How do I debug a website in Chrome?

Open the page and press F12, or Command-Option-I on a Mac, or Control-Shift-I on Windows and Linux. Read the Console for JavaScript errors and the Network panel for failed requests. Command-Option-J (Control-Shift-J on Windows and Linux) opens the Console directly.

How do I see failed network requests?

Open the Network panel, reload the page, and sort or filter by status. A 4xx or 5xx row is a failed response. Turn on Preserve log before a redirect, or the row from the previous page is cleared.

How do I share a bug with a developer?

Include the steps, the URL, what you expected, what happened, a screenshot, and the console text. A HAR file from the Network panel adds the request list. A HAR can contain cookies and tokens, so remove those before you send it. The fields to paste are in the bug report template.

Run a check

Run your first test. The command and the flags are the check command.

Related posts

Compare Monito with other tools
All Posts