描述
当我将react native更新到0.74.1时,我发现在我的Mac上的iPhone模拟器中无法使用safari devtools(直接JSC调试),而在0.74.0中是可以正常工作的。我查看了更改记录,发现这个提交,看起来在MacOS上禁止了JSC调试,但我真的需要它。
重现步骤
- 初始化一个没有框架的react native项目(react native >= 0.74.1),例如:https://reactnative.dev/docs/getting-started-without-a-framework
- 禁用hermes
- 运行npm run ios(带有iPhone模拟器)
- 打开safari devtools,iPhone模拟器中没有可用的JSContext
React Native版本
0.74.1
受影响的平台
运行时 - iOS,构建 - MacOS
npx react-native info
的输出
System:
OS: macOS 14.2.1
CPU: (8) x64 Apple M3
Memory: 28.77 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.11.1
path: ~/.nvm/versions/node/v20.11.1/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v20.11.1/bin/yarn
npm:
version: 10.2.4
path: ~/.nvm/versions/node/v20.11.1/bin/npm
Watchman:
version: 2024.04.08.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11709847
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.74.1
wanted: 0.74.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: false
newArchEnabled: false
堆栈跟踪或日志
no Stacktrace or logs
4条答案
按热度按时间laik7k3q1#
k4ymrczo2#
b0zn9rqh3#
kqqjbcuj4#