While developing with create-react-app, my browser enters debugger mode on warnings:
It breaks on the source code of react-dev-tools:
// --- Welcome to debugging with React DevTools --- // This debugger statement means that you've enabled the "break on warnings" feature. // Use the browser's Call Stack panel to step out of this override function- // to where the original warning or error was logged.
How can I deactivate this behavior?
Luckily, there’s a way to disable it. All you need to do is override the devtools global hook before React is loaded: You can find more information by checking out the issue.
React Developer Tools is a Chrome DevTools extension for the open-source React JavaScript library. It allows you to inspect the React component hierarchies in the Chrome Developer Tools. You will get two new tabs in your Chrome DevTools: "⚛️ Components" and "⚛️ Profiler".
This answer concerns Redux DevTools. Not relevant. You can use @fvilers/disable-react-devtools package to disable React Developer tool Call the disableReactDevTools () method before React is loaded, in your main file.
// Use the browser's Call Stack panel to step out of this override function- // to where the original warning or error was logged. How can I deactivate this behavior? Show activity on this post. Go to Chrome Devtools → in the Chrome console, go to Component → Click on Settings → unset Break on Warning.
Go to Chrome Devtools → in the Chrome console, go to Component → Click on Settings → unset Break on Warning. Do the same in Profiler → Settings → unset Break on warning.
@cadoman pointed check and then uncheck to make work for sure.
P.S: Image from https://github.com/facebook/react/issues/19308#issuecomment-656669792
Based on pull request DevTools: Make break-on-warn off by default #19309 it seems it's a bug.
The Break On Warnings box was unchecked for me and it still would break. Removing and readding the extension to force an update fixed it for me.
I don't know of another way to force Chrome to update an extension outside of its regular schedule.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With