Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating README to have more background, example usage, and more detailed installation instructions #119

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@

Source code for React Native's debugger frontend, based on Chrome DevTools. This project is periodically compiled and checked into the React Native repo as [`@react-native/debugger-frontend`](https://github.com/facebook/react-native/tree/main/packages/debugger-frontend).

This project provides the source code for React Native's debugging frontend, which is based on Chrome DevTools. It
enables developers working on React Native apps to debug their code more efficiently by leveraging Chrome DevTools functionality.

This repository is a fork of [ChromeDevTools/devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend).

## Example usage
After building the project, you can use the React Native Debugger frontend to inspect and debug your React Native app. First, serve the built files
locally using:

```sh
python3 -m http.server 8000 --directory out/Default/gen/front_end
```
Then, open your browser and navigate to http://localhost:8000/inspector.html for general debugging, or http://localhost:8000/rn_inspector.html for
React Native-specific debugging. This allows you to inspect UI components, monitor network requests, and analyze performance metrics directly in
your browser using Chrome DevTools.
Comment on lines +17 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then, open your browser and navigate to http://localhost:8000/inspector.html for general debugging, or http://localhost:8000/rn_inspector.html for
React Native-specific debugging. This allows you to inspect UI components, monitor network requests, and analyze performance metrics directly in
your browser using Chrome DevTools.
Then, open your browser and navigate to http://localhost:8000/rn_fusebox.html for
React Native-specific debugging.


## Development

### Initial setup
Expand All @@ -21,18 +35,28 @@ This repository is a fork of [ChromeDevTools/devtools-frontend](https://github.c

1. Build continuously with a file watcher:

This option continuously rebuilds the project whenever a file changes. It's best suited for active development as it allows you to see changes
in real time, but it can consume more system resources, especially in larger projects. Use this during iterative work when you need fast
feedback.

```sh
npm run watch
```

1. Build with the default config once:

This single, non-watched build compiles the project with the default configuration. It’s quicker and less resource-heavy than the watch build,
making it ideal for testing changes without long-term commitment to resource usage.

```sh
npm run build
```

1. Build with the release config once:

This one-time build optimizes the code for production use. It’s slower to compile and can take significantly more time but results in a stable,
high-performance version suitable for production environments. Use this when preparing the project for final deployment or release.

Comment on lines +38 to +59
Copy link

@huntie huntie Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These bits feel too verbose (AI generated?) — for the target audience, these scripts are self-documenting. Intend to come back and merge this PR, but let's do a pass of the file which removes these.

```sh
npm run build-release
```
Expand Down