Repository navigation
Feature/device selector - #3007
Closed
Matteo Boetti (teoboetti) wants to merge 20 commits into
Closed
Matteo Boetti (teoboetti) wants to merge 20 commits into
Matteo Boetti (teoboetti) wants to merge 20 commits into
Conversation
A launch installs and starts the app, which finishes evaluating its bundle well before the CDP proxy manages to attach. Hermes replays scriptParsed on Debugger.enable, so breakpoints registered for that first run resolve and look bound, but the code they belong to has already executed and they are never reached. Reloading by hand makes them work, which is what users hit today. Hermes has no pause-on-load to wait for: it answers Runtime.runIfWaitingForDebugger with "Unsupported method" (-32601), so the only lever is to run the bundle again once the debugger is ready. Send a single Page.reload after the debugger goes quiet following its initial breakpoint requests. Reloads are driven by the device (the nativePageReloads capability), so the debugger stays attached and the breakpoints re-bind. The request is sent out of band with an id the debugger never issued, so it discards the reply as an unknown response id.
* Wait for the debug adapter server to bind before reading its port Net.Server.listen() is asynchronous, so address() could still return null when DebugAdapterServer was constructed, producing a debug session pointed at an invalid port. Resolve the descriptor from the listen callback instead, and surface bind failures through reject. * Set the expected Origin header when connecting to the Metro inspector React Native's @react-native/dev-middleware validates the Origin header on /inspector/debug WebSocket upgrades and closes connections whose origin is neither the dev server nor a loopback host. The proxy connected without one, so Metro answered 401 and logged: Connection from DevTools failed to be established for origin 'undefined' Build the application transport explicitly so the Origin header derived from the inspector URL is sent, and update the CDP proxy test for the new transport creation path. * Reload the application once so first-run breakpoints are hit A launch installs and starts the app, which finishes evaluating its bundle well before the CDP proxy manages to attach. Hermes replays scriptParsed on Debugger.enable, so breakpoints registered for that first run resolve and look bound, but the code they belong to has already executed and they are never reached. Reloading by hand makes them work, which is what users hit today. Hermes has no pause-on-load to wait for: it answers Runtime.runIfWaitingForDebugger with "Unsupported method" (-32601), so the only lever is to run the bundle again once the debugger is ready. Send a single Page.reload after the debugger goes quiet following its initial breakpoint requests. Reloads are driven by the device (the nativePageReloads capability), so the debugger stays attached and the breakpoints re-bind. The request is sent out of band with an id the debugger never issued, so it discards the reply as an unknown response id. * Resolve packages from the public npm registry The lockfile pinned 220 tarballs to internal Azure Artifacts feeds and to registry.npmmirror.com. npm refuses those as "remote" type packages (EALLOWREMOTE), so npm install fails outside Microsoft's network. Both hosts mirror the public registry at the same paths, so the integrity hashes are unchanged. Drop this commit before opening a pull request upstream. * Bump version to 1.14.2 for local builds Keeps the sideloaded build ahead of the published 1.14.1 so the marketplace does not replace it on auto-update. Drop this commit before opening a pull request upstream. * Add a VSIX build workflow and an install-local script Packages the extension on a v* tag and attaches the VSIX to that release, so it can be installed on a machine without the build toolchain. Also runnable on demand via workflow_dispatch, which just uploads the artifact. npm run install-local packages and installs into Codium in one step for the local edit loop. Drop this commit before opening a pull request upstream.
* Mark local builds as patched and date-stamp their version The extension keeps upstream's msjsdiag.vscode-react-native id, so a patched local build was indistinguishable from the published one in the extensions list. Rename the display name, and put the build date in the patch version. 1.14.<YYYYMMDD> keeps the upstream base visible, always sorts above a real 1.14.x, and rises on every build without being managed by hand. An upstream 1.15.0 would sort above it, which is the point at which this fork wants rebasing anyway. npm run install-local now stamps the date before packaging, so every local install carries the day it was built. It writes package.json and the lockfile, so expect a dirty tree after a local build. Drop this commit before opening a pull request upstream. * Document installing the extension in VSCodium VSCodium resolves extensions from Open VSX, which does not carry this fork, so the packaged VSIX has to be installed directly. Cover both routes: the VSIX attached to a release by CI, and a local build via npm run install-local. Also record how a local build is told apart from the published extension, and that auto update has to be disabled because the fork keeps upstream's extension identifier. Drop this commit before opening a pull request upstream.
Brings in the EAS config error handling, symlink-safe cleanup and the ip-address/fast-uri security bumps from microsoft/vscode-react-native. Only package.json and package-lock.json overlapped with the fork: the patched displayName, the dated version and install-local survive, and the lockfile is regenerated so it differs from upstream by the version alone. The Hermes CDP and session-manager fixes are untouched.
…stop (#4) * fix(build): keep nls metadata keys relative under gulp 5 gulp 5 stores the literal "." passed as `base` on the vinyl file instead of resolving it, so vscode-nls-dev could not strip the project root from the module path and wrote absolute paths as keys in nls.metadata.json. At runtime vscode-nls looks modules up by their path relative to dist/, found nothing and rendered every localized string as "Messages not found.". Pass the absolute appRoot as base so the keys come out as src/... again. * fix(android): surface the run-android error when the device drops offline When `react-native run-android` failed and the device had gone offline in the meantime, the target lookup in the finally block threw error 1209 and replaced the original failure, so the debug console only said "There is no any Android debuggable online target" while the real cause (for example Gradle's "device offline") was buried in the Run android output channel. Keep the run-android error when at least one device was online at the start of the run, and drop the redundant second lookup in the catch block that could only re-throw the same 1209. When nothing was online from the start 1209 is still reported. Also replace the nested ternary in getTargetIdForRunApp with plain conditions and `includes`, which clears the two ESLint warnings in the file. * feat(debugger): stop the packager when the debug session is stopped Pressing Stop in the debug toolbar left Metro running. On a disconnect with terminateDebuggee set and no restart flag, stop the packager the extension spawned. Restart and plain Disconnect keep it alive, and a packager started outside the editor is never touched.
* chore(lint): clear all eslint warnings Fix the 128 code warnings reported by gulp lint with minimal, behaviour-preserving edits: strict equality, no parameter reassignment, explicit return types on exported functions, flattened promise chains, and reduce/for-index/nested-ternary rewrites. Loops that are retry, polling, or order-dependent keep their sequential await behind a no-await-in-loop disable with a reason. Add the 28 existing file names that fail unicorn/filename-case to the rule's ignore list rather than renaming them. * ci: add GitHub Actions CI, bump actions to v7, enable Dependabot Add a CI workflow that runs lint, build, unit tests and localization tests on pushes to master and on pull requests. Bump checkout, setup-node and upload-artifact to v7 in both workflows and let Dependabot keep GitHub Actions up to date weekly. * ci: bundle the extension before running tests The test suites activate the extension through its dist/rn-extension entry point, which only the webpack production build produces. Run gulp prod-build before the dev build, matching upstream's validation pipeline.
…tive into upstream-sync # Conflicts: # package-lock.json # package.json
Sync upstream 2026-10-12
…tive into upstream-sync # Conflicts: # src/cdp-proxy/reactNativeCDPProxy.ts # src/extension/reactNativeSessionManager.ts
Sync upstream 2026-10-12
…tive into upstream-sync # Conflicts: # src/cdp-proxy/CDPMessageHandlers/hermesCDPMessageHandler.ts # src/cdp-proxy/CDPMessageHandlers/iOSDirectCDPMessageHandler.ts
Sync upstream 2026-10-19
Status bar item (right side) shows the selected device and opens a picker listing running devices and offline emulators/simulators. Starting an offline Android emulator (normal or cold boot) or iOS simulator selects it once it connects. The selection is saved per workspace and fills `target` for Android/iOS launch configs that leave it open (empty, "simulator" or "device"); an explicit target still wins. - add DeviceSelector and the reactNative.selectDevice command - make Android/iOS launchSimulator public; add Android cold boot flag - open DeviceHub (Xcode 27+) or Simulator.app after booting a simulator - remove DeviceStatusIndicator, replaced by the new status bar item
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Matteo Boetti (@teoboetti) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.