profile
viewpoint

Ask questionsThe debugger / React Native was hang if too many console.log messages output to Debug Console

Actual Behavior

  1. The debugger / React Native was hang if too many console.log messages output to Debug Console (when enabled debug JS remotely) on Android emulator
  2. It's no problem if JS remote debug was disabled ( the console.log messages were outputted to Output tab.
  3. Same test code on Mac + iPhone emulator was OK
  4. I tried timer callback function to do console.log output for 1 time per second, the debugger was still hang

Expected Behavior

  1. Debugger / React Native won't hang

Software versions

  • React-Native VS Code extension version: 0.16.1
  • VSCode version: 1.46.1
  • OS platform and version: Windows 10 Pro 1909
  • NodeJS version:
  • React Native version: 0.62.2
  • Expo SDK version (include if relevant):

App.js

microsoft/vscode-react-native

Answer questions SounD120

Hi @ccl0504 and thanks for your question. React Native Tools debugger is based on debugging via local Node.js process. As we found out Node.js has some problems with large amounts of IO due to architectural features: https://github.com/nodejs/node/issues/6379. I recommend to not overload the debugger thread by non-blocking IO like console.log.

useful!

Related questions

Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 4
Error while executing command 'react-native run-ios --simulator --no-packager' hot 2
Cannot read property 'getCurrentUserAsync' of undefined hot 1
Expo app doesn't connect to packager hot 1
Current workspace does not contain React Native projects hot 1
Could not debug - error code 604 hot 1
Current workspace does not contain React Native projects hot 1
[Bug][Expo] XDLError: packagerPort must be an integer - vscode-react-native hot 1
Version 0.13 breaks running packager from VS Code from different folder hot 1
Error while executing command 'react-native.cmd run-android --no-packager': Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 1
Starting React packager from VSCode fails hot 1
Can't attach packager for debugging hot 1
Cannot bind listener: operation not permitted hot 1
Not all success patterns were matched. (error code 712) hot 1
Current workspace does not contain React Native projects hot 1
Github User Rank List