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
Copy file name to clipboardExpand all lines: cndocs/appendix.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
+
# 附录
2
+
1
3
## 一、术语
2
4
3
5
整个与新架构相关的指南将遵循以下**术语**:
4
6
5
-
-**Spec** - TypeScript or Flow code that describes the API for a Turbo Native Module or Fabric Native component. Used by **Codegen**to generate boilerplate code.
Copy file name to clipboardExpand all lines: cndocs/debugging-native-code.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ title: 调试原生代码
6
6
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
7
7
8
8
<divclassName="banner-native-code-required">
9
-
<h3>Projects with Native Code Only</h3>
10
-
<p>The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on <ahref="https://docs.expo.dev/workflow/prebuild/"target="_blank">prebuild</a> to use this API.</p>
You can display the native logs for an iOS or Android app by using the following commands in a terminal while the app is running:
15
+
当应用正在运行时,你可以在终端中使用以下命令打印 iOS 或 Android 应用的日志:
16
16
17
17
```shell
18
18
# For Android:
@@ -21,18 +21,18 @@ npx react-native log-android
21
21
npx react-native log-ios
22
22
```
23
23
24
-
You may also access these through Debug > Open System Log… in the iOS Simulator or by running `adb logcat "*:S" ReactNative:V ReactNativeJS:V`in a terminal while an Android app is running on a device or emulator.
24
+
你也可以通过 iOS 模拟器中的 "Debug > Open System Log..." 菜单,或者在运行 Android 应用的设备或模拟器中运行 `adb logcat "*:S" ReactNative:V ReactNativeJS:V`来访问这些日志。
25
25
26
-
## Debugging in a Native IDE
26
+
## 在原生 IDE 中调试
27
27
28
-
When working with native code, such as when writing native modules, you can launch the app from Android Studio or Xcode and take advantage of the native debugging features (setting up breakpoints, etc.) as you would in case of building a standard native app.
28
+
当你编写原生模块时,你可以使用 Android Studio 或 Xcode 来启动应用,并使用其原生调试功能(设置断点等),就像在构建标准原生应用时一样。
29
29
30
-
Another option is to run your application using the React Native CLI and attach the native debugger of the native IDE (Android Studio or Xcode) to the process.
30
+
另一种选择是使用 React Native CLI 运行应用,并从原生 IDE(Android Studio 或 Xcode)中附加到进程。
31
31
32
32
### Android Studio
33
33
34
-
On Android Studio you can do this by going on the "Run" option on the menu bar, clicking on "Attach to Process..." and selecting the running React Native app.
34
+
在 Android Studio 中,你可以通过点击菜单栏中的 "Run" 选项,然后选择 "Attach to Process...",并选择正在运行的 React Native 应用。
35
35
36
36
### Xcode
37
37
38
-
On Xcode click on "Debug" on the top menu bar, select the "Attach to process" option, and select the application in the list of "Likely Targets".
38
+
在 Xcode 中,点击菜单栏中的 "Debug",选择 "Attach to Process...",然后从 "Likely Targets" 列表中选择正在运行的应用。
Copy file name to clipboardExpand all lines: cnwebsite/versioned_docs/version-0.76/appendix.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
+
# 附录
2
+
1
3
## 一、术语
2
4
3
5
整个与新架构相关的指南将遵循以下**术语**:
4
6
5
-
-**Spec** - TypeScript or Flow code that describes the API for a Turbo Native Module or Fabric Native component. Used by **Codegen**to generate boilerplate code.
Copy file name to clipboardExpand all lines: cnwebsite/versioned_docs/version-0.76/debugging-native-code.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ title: 调试原生代码
6
6
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
7
7
8
8
<divclassName="banner-native-code-required">
9
-
<h3>Projects with Native Code Only</h3>
10
-
<p>The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on <ahref="https://docs.expo.dev/workflow/prebuild/"target="_blank">prebuild</a> to use this API.</p>
You can display the native logs for an iOS or Android app by using the following commands in a terminal while the app is running:
15
+
当应用正在运行时,你可以在终端中使用以下命令打印 iOS 或 Android 应用的日志:
16
16
17
17
```shell
18
18
# For Android:
@@ -21,18 +21,18 @@ npx react-native log-android
21
21
npx react-native log-ios
22
22
```
23
23
24
-
You may also access these through Debug > Open System Log… in the iOS Simulator or by running `adb logcat "*:S" ReactNative:V ReactNativeJS:V`in a terminal while an Android app is running on a device or emulator.
24
+
你也可以通过 iOS 模拟器中的 "Debug > Open System Log..." 菜单,或者在运行 Android 应用的设备或模拟器中运行 `adb logcat "*:S" ReactNative:V ReactNativeJS:V`来访问这些日志。
25
25
26
-
## Debugging in a Native IDE
26
+
## 在原生 IDE 中调试
27
27
28
-
When working with native code, such as when writing native modules, you can launch the app from Android Studio or Xcode and take advantage of the native debugging features (setting up breakpoints, etc.) as you would in case of building a standard native app.
28
+
当你编写原生模块时,你可以使用 Android Studio 或 Xcode 来启动应用,并使用其原生调试功能(设置断点等),就像在构建标准原生应用时一样。
29
29
30
-
Another option is to run your application using the React Native CLI and attach the native debugger of the native IDE (Android Studio or Xcode) to the process.
30
+
另一种选择是使用 React Native CLI 运行应用,并从原生 IDE(Android Studio 或 Xcode)中附加到进程。
31
31
32
32
### Android Studio
33
33
34
-
On Android Studio you can do this by going on the "Run" option on the menu bar, clicking on "Attach to Process..." and selecting the running React Native app.
34
+
在 Android Studio 中,你可以通过点击菜单栏中的 "Run" 选项,然后选择 "Attach to Process...",并选择正在运行的 React Native 应用。
35
35
36
36
### Xcode
37
37
38
-
On Xcode click on "Debug" on the top menu bar, select the "Attach to process" option, and select the application in the list of "Likely Targets".
38
+
在 Xcode 中,点击菜单栏中的 "Debug",选择 "Attach to Process...",然后从 "Likely Targets" 列表中选择正在运行的应用。
0 commit comments