Nuclide React Native: Start Debugging - react-native

Trying to use nuclide with atom but I cannot get the debugger to work. I have nuclide installed (v0.243.0). Running on Mac and followed the setup instructions in the docs. I run the RN packager within Nuclide, start the debugger and then run 'react-native run-ios' from terminal and lastly enable chrome debugging.But I cannot find find nuclide command 'Nuclide React Native: Start Debugging'.
https://i.stack.imgur.com/lNV9U.png

React Native debugger support was dropped by [fccd95d]

Related

"New update available, downloading..." on Expo

After opening my React Native project in Expo, I get a "New update available, downloading..." infinite loading on the Android emulator.
I tried restarting the server and restarting the emulator, expecting to see the actual content of my React Native application.
I managed to solve this problem by following these steps:
Stop the server.
Uninstall Expo on Android emulator.
Run npm start.
Reopen the application on Android emulator.

React Native Expo app - unable to open app in iOS emulator

I want to run my React Native app in the iOS emulator. Here is what I done so far:
I installed XCode, along with its command line tools, and can bring up the emulator without issue.
I created an empty React Native app using the Expo CLI, per the instructions here. https://facebook.github.io/react-native/docs/getting-started. I am running on Node v10.0.0 on a Mac.
Afterwards I install all the necessary dependencies.
I then run "sudo npm run ios". This fires up the Metro Bundler as well as the iOS simulator. The Simulator loads up after about 5 minutes of waiting, but my app does not start up.
What am I missing here?
I should note that I prefer to stick with Expo, so I'd prefer not to have to eject.

console.log doesn't work with react-native

I'm starting with react-native and I'm getting this problem: I can't log to bundler metro server.
If I create my application using create-react-native-app, I can do 'console.log' and value are logged to metro bundler (running on port 8081).
But if I create my application with react-native init <project>, this doesn't work. To make console.log work, I need to open Chrome DevTools and set remote debug in application.
So my question is: is there any way to make native code to log in bundler console with console.log? I don't want to work with 'create-react-native-app' because it uses Expo and 'realm' database doesn't support expo.
I've tried with react-native 0.55.4 and 0.56, both in windows and linux.
You can also see the console.log() outputs using these commands:
$ react-native log-android
$ react-native log-ios
Note: It also works to debug native errors, for example when you have a blank screen and metro bundler doesn't show errors neither.
For more information you can check this out
Don't know if I correctly understand your question (because of my english), but you can try this:
Run adb logcat *:S ReactNative:V ReactNativeJS:V in a terminal to see
your Android app's logs.
Taken from Using adb logcat for React Native Debugging
You can download React Native Debugger and Open your JS Debugger in development menu. You can see everything into RN Debugger.
I discovered that console.log are omitted from console log if your disable remote debug from the debug menu
On Mac. While on ios simulator Clicked on
Command-d->Stop Debugging
.This made logging work for me.

React Native stuck on Loading dependency graph, done and when go to localhost:8081, I see React Native packager is running

Env:
Mac OS X
nodejs 8.9.1
Xcode installed
using boilerplate generated by https://github.com/react-community/create-react-native-app
Symptom:
React Native stuck on Loading dependency graph, done and when go to localhost:8081, I see React Native packager is running.
Also the command line after I did npm start what I got is Loading dependency graph, done. and just stay there, even after I waited for almost 5min.
Actually I found the answer myself.
There is actually nothing wrong. I forgot to start the React Native in the simulator! lol Silly right?
So basically let say if you want to start the iOS simulator in a MacOS, you can just do react-native run-ios --simulator="iPhone 5s" in your project root. Then boom! your project started!
Note that React Native can't really run in the browser, it has to be running inside a phone simulator either iOS or Android.
See official doc for more https://facebook.github.io/react-native/docs/running-on-simulator-ios.html
Have fun!

Debug a react-native application using nuclide

Is there any good document/video that talks about how to debug a react-native application using Nuclide.
Am a newbie. Its my first time app development and first time with React.
I did create the project using react-native init. I don't think i found a BUCK file for me to run and debug my app. I also don't see to get how to view the errors in my JS file. I have to run the simulator to see. I run it using react-native run-ios.
I tried Nuclide->React Native->Start Debugging. Not sure what this is supposed to do.
Sorry if these questions sound silly.
According to this instruction you should:
From the command Palette (Cmd-Shift-P) choose "Nuclide React Native: Start Packager" to start the React Native Server.
Ensure that you are in the root directory of the React Native project, then run the application from the command-line: "$ react-native run-ios" (or choose other existing simulator, for example react-native run-ios --simulator="iPhone4s").
After starting the server, you can prime the React Native Debugger for when the application begins running. From the command Palette (Cmd-Shift-P), launch "Nuclide React Native: Start Debugging".
From the Simulator press Cmd-D (Ctrl-D on Linux). This will bring up the debug options for your application. Select "Debug JS Remotely.
...After you enable debugging from the simulated application, Nuclide will attach to that debugging process automatically, since we primed the Debugger above.
Debug JS in Nuclide is now an option in the dev menu added in React Native version 0.52 December 2017 release.
See This