React running debugger out of the blue?

Viewed 3453

My React app has started running this line out of the blue and interrupting my development. The file is React_devtools_backend.js

debugger;t.apply(void 0,o)};n.__REACT_DEVTOOLS_ORIGINAL_METHOD__=t,// $FlowFixMe property error|warn is not writable.

Any ideas why and how to fix this?

2 Answers

It is a bug in React Dev Tools (version: 4.8.0). You can see the issue here. If you use Firefox and update the extension, probably it is going to be fixed. If you are using Chrome, the update is still pending but you can find a temporary solution in the issue link.

Temporary solution:

You should also be able to go to Components tab, press Settings gear, add checkbox to Break on Warning, then do this again, and remove the checkbox as a temporary workaround.

This issue has a momentarily quick fix if you're on Chrome (react-devtools@4.8.0):

unexpected debugger in devtools 4.8.0

  • Open React-DevTools > Components.
  • In the upper right corner, click the Settings gear icon.
  • Go to the Debugging tab.
  • Check Break on Warnings.
  • Uncheck Break on Warnings.
  • Finally, reload the page.
Related