react-native-macos icon indicating copy to clipboard operation
react-native-macos copied to clipboard

react-devtools & console.log

Open jerrygreen opened this issue 5 years ago • 5 comments

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

Environment:
  OS: macOS 10.14
  Node: 9.3.0
  Yarn: 1.6.0
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 10.0 Build version 10A255
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.2.0 => 16.2.0
  react-native: Not Found

Target Platform: macOS 10.14

Steps to Reproduce

  1. Build a new app from scratch:
react-native-macos init Test
cd Test
react-native-macos run-macos
  1. Add console.log to, for example, render function of App.js:
console.log('Oh my log!')
  1. Now use standalone devtools (I suppose you already have it):
react-devtools
  1. Open devtools and its console:
  • ⌘+ ⌥ + I
  • open console tab
  • try to refresh your running app few times, to fill the log tab with some output

Expected Behavior

I expect to see my console.log output, i.e. "Oh my log!"

(Do I misunderstand something?)

Actual Behavior

I don't see my logs, just:

[React DevTools] Connected
[React DevTools] Connection to RN closed
[React DevTools] Connected
[React DevTools] Connection to RN closed
[React DevTools] Connected

Obviously, "Connection to RN closed" because of refreshing. But where's my "Oh my log!"?

image

Reproducible Demo

The example is very simple, I don't think it's really needed (I'm almost sure I misunderstand something, something obvious?)

jerrygreen avatar Oct 24 '18 21:10 jerrygreen