1

In terms of debugging DESIGN (User Interface), I'm currently looking for an alternative to render the components, maybe straight in the browser (is that possible)?

I found the standard way too much disruptive. Everytime there is a different issue, the emulator is slow and freezes, the hot reloading fails. Also if you connect the phone you have all the work connecting, installing the app, enabling the options.. sometimes also gives you trouble.

If you are working with the design part, it can be very annoying dealing with these micro issues. Is there a straight foward way to debug? Just like we would debug a ReactJs app?

Maybe for Mac it can work smootly, but on Ubuntu I have been struggling for many weeks to get things working, but still no success. Any advice is welcome. Thank you.

  • Possible duplicate of [How do you debug React Native?](https://stackoverflow.com/questions/29289304/how-do-you-debug-react-native) – Aarsh Oza Apr 17 '19 at 17:05
  • I know, but Im considering utilizing UI tools to speed up the work. Maybe I should have been more clear about it. – Guilherme Nunes Apr 17 '19 at 17:07

2 Answers2

1

Recommended

Have you tried all of theses?

What I do

I use

react-native log-android

This will show everything you console.log in the terminal.

Then create a logger

function logger(anything){
    console.log(JSON.stringify(anything, null, 2))
}

This will show in the console everything idented, wich is much better to see in the console.

And after, I would just use logger everywhere in the code.

This is the simplest and fastest way I found.

Vencovsky
  • 28,550
  • 17
  • 109
  • 176
  • I havent tried this method yet, Im gonna give a try thank you. How about the UI? Is there a way to render UI elements in Chrome instead of in the emulator or in the phone? Im currently working in the design part, and right now I cant rely fully on the standard methods. Maybe I need to fix all the issues before trying ... – Guilherme Nunes Apr 17 '19 at 14:53
  • Because react-native is native, you can't emulate the phone in the emulator, but you can try using [snack](https://snack.expo.io/). I never used it, but you can emulate it in the chrome. – Vencovsky Apr 17 '19 at 14:55
0

TRY this package the best debugger tool out there

Aarsh Oza
  • 164
  • 1
  • 4
  • 19