srlrs20020
srlrs20020

Reputation: 437

I can't get logs to the console to work since ejecting from create-react-native-app?

When I run react-native log-ios in the the terminal the following warning repeats over and over again until i press ctrl+c (and nothing is logged to the console with console.log):

<Warning>: Service exited with abnormal code: 1
Dec 18 10:17:24 home com.apple.CoreSimulator.SimDevice.1336CFD7-B627-4A72-9DE9-5FAE927C1E82[3289] (com.apple.videosubscriptionsd) <Notice>: Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

I have also tried atom/nuclide, which I saw should log to the console automatically in another answer, but nothing I log shows up there either.

I'm not sure what other information I can provide. Thanks for the help.

Upvotes: 3

Views: 548

Answers (1)

ShaneG
ShaneG

Reputation: 1518

For debugging in react-native you can do the following:

  1. On your simulator, press cmd+D and turn on remote debugging. That will bring up the correct console in your browser
  2. For a real device, shake it over and back in the app you are developing to bring up the developer options. Here you can also toggle this on and off

Upvotes: 1

Related Questions