提问者:小点点

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.

如何停用这种行为?


共3个答案

匿名用户

转到Chrome Devtools>; 在chrome控制台中,转到组件=>; 单击“设置”->; 取消设置警告中断。 在探查器中执行相同的操作=>; 设置=>; 取消设置警告中断。

编辑1:@cadoman尖头勾选,然后取消勾选以确保正常工作。

以下添加P.S图片来自https://github.com/facebook/react/issues/19308#issuecomment-6566669792

匿名用户

根据https://github.com/facebook/react/pull/19309,这似乎是一个bug。 对我来说,“警告时中断”框是未选中的,它仍然会中断。 删除并重新添加扩展以强制更新为我修复了它。 我不知道还有什么办法可以迫使Chrome在常规计划之外更新一个扩展。

匿名用户

转到调试选项卡中的ReactDev工具,禁用“警告时中断”。

我认为这种新的行为是从今天这个新的pr开始的:https://github.com/facebook/react/pull/19048

相关问题