vscode folder of the project.Ĭlick the Add Configuration button that shows up when you open the file, then click on React Native. You can also create the launch.json file manually in the. Click on the Run view in VS Code, and then click Create a launch.json file.Ĭhoose any option that shows because we will paste over the contents of the file. Next, you need to create a debug configuration for VS code. Open up VS Code and your React Native project and search the extensions for “React Native Tools.” Make sure you see the Microsoft name on the extension. The next step is to install the React Native Tools extension in VS Code. To check that your development environment is set up correctly, you can run the following command in your project folder: npx react-native doctor Have VS Code installed, set up your React Native development environment set up, and have a project you want to debug. Setting up React Native and VS Codeįirst, make sure you have a few things ready. In this article, we’ll do just that by debugging a React Native app using VS Code. There are several ways to debug a React Native app, including using Google Chrome, Flipper, or React Native Debugger, but it’s nice to have the same Android Studio or XCode experience where you can write code and debug in the same app. I discovered, however, that I could use VS Code. But I missed the type of debugging I could do in Android Studio. When I moved to React Native, though, I used console.log to debug my apps most of the time. When I developed native Android apps, I never had to set up debugging. Stephan Miller Follow Stephan is a full-stack web and mobile developer with over 16 years of experience.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |