# debug-javascript-ios-device.mo

## Prerequisites

* [ ] Have [React Native Debugger](https://github.com/jhen0409/react-native-debugger) installed
* [ ] Have a certificate + provisioning profile for debug

## Steps

> :warning: The Ip mentioned is the one from your local network and not your router's ip on the internet
>
> :warning: Make sure you have reverted the changes after debugging to avoid build issues

* Make sure both the device and computer are on the same network
* Open your project in Xcode
* In `Libraries/React.xcodeproj/React/Base/RCTBundleURLPRovider.m`
  * Replace `NSString *host = ipGuess ?: @"localhost";`
  * With your computer IP address (remove ipGuess if it poses problems): `NSString *host = @"<your_computer_ip>";`
* In `Libraries/RCTWebSocket.xcodeproj/RCTWebSocketExecutor.m`
  * Replace: `host = @"localhost";`
  * With your computer IP address: `host = @"<your_computer_ip>";`
* Verify signing by making sure you have obtained the signing certificate for debug first
* Run the app
* Shake to open the menu
* Hit *Debug Remotely*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bamtech.gitbook.io/dev-standards/react-native/debugging/debug-javascript-ios-device.mo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
