You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes a problem with debugger on expo projects, caused by
prelude lines added to the entry bundle file added by expo. The solution
is t0 add the required offset to the prelude causing the problem and
scanning for it when receiving source map in the debuger.
It is possible that the changes will no longer be needed in future
versions of react native as the expo team tries to correct source map
generation to include extra lines, for more information read those PRs:
- [expo side ](expo/expo#29463)
- [metro side](facebook/metro#1284)
This is why we add version check before adding lineOffset to initial
source map.
### How Has This Been Tested:
- open expo project and set a breakpoint, before the changes it would
trigger 2 lines above the place it's been set.
- save any change in the file containing breakpoint and make sure it
still works.
- check if links to files generated next to console logs are pointing in
to the correct place, again both before and after making changes to the
file.
- check if error position indicator (when uncaught exception is raised)
points to the correct position.
### Additional changes:
This PR also fixes a minor mistake with `getReactNativeVersion` utility
that does not need to be async and as it is used, we make it synchronous
as part of this PR.
---------
Co-authored-by: Krzysztof Magiera <[email protected]>
Copy file name to clipboardexpand all lines: packages/vscode-extension/src/builders/buildAndroid.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ export async function buildAndroid(
143
143
),
144
144
];
145
145
// configureReactNativeOverrides init script is only necessary for RN versions older then 0.74.0 see comments in configureReactNativeOverrides.gradle for more details
"--init-script",// configureReactNativeOverrides init script is used to patch React Android project, see comments in configureReactNativeOverrides.gradle for more details
0 commit comments