The React Components and Profiler tabs do not show in Chrome DevTools
The Components and Profiler tabs are missing from Chrome DevToolsShort answer
The React Developer Tools extension adds the Components and Profiler tabs only when React on the page can talk to it. They stay hidden when the page is not a React app, when it is opened from a file:// address without file access, when the extension's service worker is inactive, or when React runs inside an iframe. Check the global hook first, then fix the matching cause.
Fix it fast
1Find out which cause you have
Open the DevTools console on the page and print the hook that the extension installs. If it prints undefined, the extension is not running on this page, so go to the file URL, service worker and iframe causes. If it prints an object, the extension is running, so look at the first cause.
window.__REACT_DEVTOOLS_GLOBAL_HOOK__2Match what you see, then jump to its fix
- 1
The hook exists in the console, but no React tabs appearThe page does not run React, or React cannot reach the devtools hookFix - 2
The address bar starts with file:///The page is opened from a file:// addressFix - 3
service worker (inactive) next to the extension on the Chrome extensions pageThe extension's service worker is inactiveFix - 4
The page you open is a shell, and the React app is embedded in a frame inside itThe app runs inside an iframe, an extension or another unusual hostFix
- 1
What does the error look like?
The Components and Profiler tabs are missing from Chrome DevToolsservice worker (inactive)
Cause 1 of 4
The page does not run React, or React cannot reach the devtools hook
1Check
The extension documentation says the tab does not appear if the site does not use React, or if React cannot communicate with the devtools. A static page, a docs site or the wrong port will all look like that. Confirm that the app you are looking at really depends on React.
npm ls react react-dom2Fix
Open the address of the app that actually renders React, not a static page beside it. If React runs in a frame or another unusual host, use the standalone version from the last cause.
npm run dev3Verify
Reload the page, close DevTools and open it again. The Components and Profiler tabs should be listed.
window.__REACT_DEVTOOLS_GLOBAL_HOOK__Confirmed by github.com
Cause 2 of 4
The page is opened from a file:// address
1Check
The extension's README says that a page opened from a local file:// address needs the Allow access to file URLs setting turned on for the extension.
window.location.protocol2Fix
Turn on Allow access to file URLs for the extension on the Chrome extensions settings page. The simpler way is to serve the folder over HTTP with a local server such as serve.
npx serve .3Verify
Open the page through the http://localhost address that the server prints and reload.
window.location.protocolConfirmed by github.com
Cause 3 of 4
The extension's service worker is inactive
1Check
Open the extensions page and look at the React Developer Tools card. An inactive worker means the extension is not talking to the page.
window.__REACT_DEVTOOLS_GLOBAL_HOOK__2Fix
Disable the extension and enable it again. Then close DevTools, reload the page and open DevTools again.
# chrome://extensions: toggle off, toggle on; reload the page; reopen DevTools3Verify
The card no longer says inactive, and the tabs appear after the reload.
window.__REACT_DEVTOOLS_GLOBAL_HOOK__Confirmed by github.com
Cause 4 of 4
The app runs inside an iframe, an extension or another unusual host
1Check
The project's own guidance points to the standalone version for an app inside an iframe, a Chrome extension, React Native or another unusual environment.
npm ls -g react-devtools2Fix
Install the standalone package, start it, and add its script as the first script in head while you debug. Remove that line before production.
npm install -g react-devtools
react-devtools
<!-- first script in <head>, development only -->
<script src="http://localhost:8097"></script>3Verify
Reload the page. The standalone window should list the component tree.
window.__REACT_DEVTOOLS_GLOBAL_HOOK__Confirmed by react.dev
How do I stop it coming back?
- Serve local pages over http://localhost during development instead of opening files directly.
- When the tabs vanish, check chrome://extensions for an inactive worker before you start debugging your own code.
- Keep the standalone react-devtools installed for the one project that renders React inside a frame.
- Remove the standalone script tag from the head before you ship.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- TaskvareA task and project-management suite: React on the web, Flutter on mobile, TypeScript underneath.
Related fixes
Web apps
Module not found for antd/dist/antd.less after upgrading to Ant Design 5
Module not found: Error: Can't resolve 'antd/dist/antd.less'
Ant Design 5 dropped Less and the bundled CSS file for CSS-in-JS, so antd/dist/antd.less no longer exists.
3 causes, each with a fixWeb apps
Astro Code component fails inside a React component
Astro components cannot be rendered directly via function call
Astro components such as Code only exist on the server and render static HTML.
2 causes, each with a fixWeb apps
React shows Attempted import error when importing a component or function
Attempted import error:
The build found the file but not the name you asked for.
2 causes, each with a fixWeb apps
How to catch and handle a 422 from Axios in a Redux thunk
action.error.message is 'Rejected' and action.payload is undefined
A 422 means the server read the request but cannot process its content, so repeating it unchanged fails again.
4 causes, each with a fixWeb apps
axios gets 429 Too Many Requests from a React app
429 (Too Many Requests)
A 429 comes from the server or an API gateway, not from axios: your client sent too many requests in a window.
4 causes, each with a fixWeb apps
Axios request is not cancelled when a React component unmounts
A cancelled request is logged as an error in the catch block
Axios cancels a request when you pass it an AbortSignal and later call abort() on its controller.
4 causes, each with a fix