![]() |
VOOZH | about |
In this tutorial, weโll show you how to use React Native Debugger to โ you guessed it โ debug React Native apps.
๐ React Native LogoYou might be wondering, why not use the default React Native debug tool? What makes React Native Debugger unique? Read on to learn the answers to these questions and see how React Native Debugger works.
The Replay is a weekly newsletter for dev and engineering leaders.
Delivered once a week, it's your curated guide to the most important conversations around frontend dev, emerging AI tools, and the state of modern software.
To start debugging, we need to install React Native Debugger. You can install React Native Debugger from GitHub. Or, if youโre on macOS, you can run this command in your terminal:
brew update && brew install --cask react-native-debugger
After downloading and installing the package, you can start using React Native Debugger.
Letโs launch the debugger tool. You can see that React Native Debugger is in waiting state and the debugger tool is listening at port 8081:
To connect your app with React Native Debugger, you need to run your app and start debug mode.
To start debug mode, shake your mobile device or press Command + Shift + Z or Ctrl + M and choose the debug option.
Now youโll see that your app is connected with the React Native Debugger tool:
๐ React Native Debugger Tool
Weโre all set to begin using React Native Debugger.
What sets React Native Debugger apart is that it combines a wide range of features into a single standalone app. Some of the coolest features include:
Letโs zoom in on each feature in more detail.
If youโre a web developer, you should be familiar with the element inspector. In React Native Debugger, the UI Inspector works the same way: you can see all the tags you use in your app and check the styling. Even more amazing, you can test your UI and change styling from the inspector.
๐ Debugging UI React Native
This makes your UI testing much faster and accelerates the process of building your UI accordingly.
Whether youโre working on a React or React Native app, youโll eventually need a state management library. Redux is one of the leading state management libraries available.
That said, using Redux can be a pain if you canโt debug your state, especially in React Native. React Native Debugger enables you to easily debug your Redux-based app. You can even debug real time state.
You can use Redux time travel to debug your state over the time. This technique is especially helpful when working on big projects.
To use the Redux dev tool, you need to activate Redux in your app. To do this, you need to add the following code to your App.js. Or, you can add it to main function of Redux.
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__; const store = createStore(reducers, /* preloadedState, */ composeEnhancers(middlewares));
Today, itโs very common for an app to fetch data from the cloud or a server. To perform such a task, we need to connect to the internet or a network.
You may encounter the need to monitor a request. For example, when making an API call, you may need to check whether youโre sending the right API parameters. Or you might want to verify the response from the server.
To debug a request, we can use the network inspector feature in React Native Debugger. Click the Network tab, as shown below:
๐ Network tab React Native Debugger
After opening the network inspector, if you make a network request, you can see all the request and their responses in this tab.
AsyncStorage management in React NativeIf you want to print or log your AsyncStorage in the console, you can do so easily with the following command:
console.log(showAsyncStorageContentInDev())
This will print or log the AsyncStorage data in the console on React Native Debugger.
Breakpoints can be very helpful when you need to stop your code execution at a certain time.
You can also check the code execution flow and see a variableโs value. Put simply, breakpoints help you understand your appโs behavior and spot errors within seconds.
In this tutorial, we covered how to use React Native Debugger to debug React Native apps. We also reviewed some of React Native Debuggerโs most important features designed to help accelerate and streamline the development process.
LogRocket's Galileo AI watches sessions for you and and surfaces the technical and usability issues holding back your React Native apps.
LogRocket also helps you increase conversion rates and product usage by showing you exactly how users are interacting with your app. LogRocket's product analytics features surface the reasons why users don't complete a particular flow or don't adopt a new feature.
Start proactively monitoring your React Native apps โ try LogRocket for free.
Learn how next-browser gives AI agents runtime context for debugging Next.js apps, including React props, hydration, PPR, forms, and performance.
Build dynamic LLM routing in Next.js with OpenRouter, TanStack AI, task classification, model fallbacks, and cost-aware routing.
TSRX adds first-class control flow, conditional hooks, and scoped styles to React via a TypeScript compiler extension โ no new framework required.
Learn how to build a full React Native auth system using Better Auth and Expo โ with email/password login, Google OAuth, session persistence, and protected routes.
Hey there, want to help make our blog better?
Join LogRocketโs Content Advisory Board. Youโll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.
Sign up now