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

Fix debugger detaching when restarting on Expo Go #985

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maciekstosio
Copy link
Contributor

This PR fixes issue where debugger is detached after restart, when runing Expo Go app. This is due to the fact that when reloading metro, the new instance of debugger with new websocket adress is created.

This PR solves it as follows:

  • after running metro.reload() we wait for app to be ready
  • once it's ready we check, if websocketAdress changed
  • if it changed we connect debugger to the new adress

How Has This Been Tested:

  • Lunch expo-go app with
  • Test if debugger works (for example log or break point)
  • Restart with Reload JS
  • Wait until is restarted, and make sure debugger is still attached

Checked on both Expo Go and RN76.

Expo Go Before Expo Go After
Expo.Go.Before.mov
Expo.Go.After.mov
RN76 Before RN 76 After
RN.76.Before.mov
RN.76.After.mov

Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 22, 2025 3:27am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant