-
Notifications
You must be signed in to change notification settings - Fork 558
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
forwardDebugPort does not work correctly if more than one device / emulator #356
Comments
@cancan101 this is somewhat expected because when using Chrome debug mode, the JS that's running in Chrome needs to make HTTP requests to |
Yes, I know the command on the CLI. Is there no way to get the correct value from the launch configs and set it here? |
I'm not really sure if there is a way to do that here. If you have any ideas, I'd love to hear them! It's definitely something we need to address though considering they changed |
What exactly is this port forwarding for anyways? At first I thought it might be realm browser, but I don't think that is the case? |
@cancan101 port forwarding is for chrome debug mode. |
What is special about realm here that it needs to set up this forwarding? |
Unlike other react-native modules Realm apis are synchronous and are built directly on top of the JS engine. We do this for good performance (we don't have to copy data for every call) and api simplicity. This is why you are able to access object properties using normal property getters/setters rather than using async callbacks which we thought would be cumbersome and awkward. To make chrome debugging work with this design we had to build an rpc server that allows us to synchronously forward all api calls so they are run on the device/emulator. This rpc server is what requires port forwarding and is only used when debugging in chrome. |
We should mention this in the docs. |
The text was updated successfully, but these errors were encountered: