Developer experience is one of the draws of React Native. react-native-windows
supports most of the development mode features supported on iOS and Android.
- Deploy the app either from Visual Studio 2017 or using the
run-windows
command. - When the app launches and finishes loading the menu, press the
Menu
key orShift+F10
. - Experiment with some of the tools, like Inspector.
- Open Visual Studio Code from the root of your project. Ensure you have the React Native Tools extension installed.
- Ensure you have the packager running (or restart it).
- In Visual Studio Code, add a React Native debug configuration to your
launch.json
settings. - Run the
Attach to packager
debug configuration. - Start your React Native app, ope the developer options menu, and choose
Start JS Remote Debugging
. - Try setting some break points in your app and reloading the JS bundle (with either the developer options menu or
Ctrl+R
).
- If you closed the solution after Lesson 13, re-open the solution in Visual Studio 2017.
- Double check that you still have a packager running from a previous
run-windows
call. If not, restart the packager usingnpm start
orreact-native start
. - When the solution loads in Visual Studio, ensure you have either
x86
orx64
selected as the target platform and launch the app (by clicking the start button or pressingF5
). - Try setting some breakpoints in the custom native module we created in Lesson 13.
- Understand how to open the developer options menu on
react-native-windows
apps - Understand how to debug
react-native-windows
JavaScript in VS Code - Understand how to use Visual Studio 2017 to debug native code.