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: docs/topics/coroutine-context-and-dispatchers.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ The Coroutine Debugger of the Kotlin plugin simplifies debugging coroutines in I
148
148
The **Debug** tool window contains the **Coroutines** tab. In this tab, you can find information about both currently running and suspended coroutines.
149
149
The coroutines are grouped by the dispatcher they are running on.
Copy file name to clipboardExpand all lines: docs/topics/debug-coroutines-with-idea.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The tutorial assumes you have prior knowledge of the [coroutines](coroutines-gui
16
16
17
17
The `src` directory contains Kotlin source files and resources. The `main.kt` file contains sample code that will print `Hello World!`.
18
18
19
-
2. Change code in the `main()` function:
19
+
3. Change code in the `main()` function:
20
20
21
21
* Use the [`runBlocking()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html) block to wrap a coroutine.
22
22
* Use the [`async()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/async.html) function to create coroutines that compute deferred values `a` and `b`.
@@ -61,7 +61,7 @@ The tutorial assumes you have prior knowledge of the [coroutines](coroutines-gui
61
61
62
62

63
63
64
-
3. Resume the debugger session by clicking **Resumeprogram**in the **Debug** tool window:
64
+
3. Resume the debugger session by clicking **ResumeProgram**in the **Debug** tool window:
65
65
66
66

67
67
@@ -70,7 +70,7 @@ The tutorial assumes you have prior knowledge of the [coroutines](coroutines-gui
70
70
*The second coroutine is calculating the `a` value – it has the **RUNNING** status.
71
71
*The third coroutine has the **CREATED** status and isn’t calculating the value of `b`.
72
72
73
-
4. Resume the debugger session by clicking **Resumeprogram**in the **Debug** tool window:
73
+
4. Resume the debugger session by clicking **ResumeProgram**in the **Debug** tool window:
74
74
75
75

Copy file name to clipboardExpand all lines: docs/topics/debug-flow-with-idea.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Create a Kotlin [flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-corou
18
18
19
19
The `src` directory contains Kotlin source files and resources. The `main.kt` file contains sample code that will print `Hello World!`.
20
20
21
-
2. Create the `simple()` function that returns a flow of three numbers:
21
+
3. Create the `simple()` function that returns a flow of three numbers:
22
22
23
23
* Use the [`delay()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/delay.html) function to imitate CPU-consuming blocking code. It suspends the coroutine for 100 ms without blocking the thread.
24
24
* Produce the values in the `for` loop using the [`emit()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow-collector/emit.html) function.
@@ -36,7 +36,7 @@ Create a Kotlin [flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-corou
36
36
}
37
37
```
38
38
39
-
3. Change the code in the `main()` function:
39
+
4. Change the code in the `main()` function:
40
40
41
41
*Use the [`runBlocking()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html) block to wrap a coroutine.
42
42
*Collect the emitted values using the [`collect()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/collect.html) function.
@@ -53,13 +53,13 @@ Create a Kotlin [flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-corou
53
53
}
54
54
```
55
55
56
-
4. Build the code by clicking **BuildProject**.
56
+
5. Build the code by clicking **BuildProject**.
57
57
58
58

59
59
60
60
## Debug the coroutine
61
61
62
-
1. Set a breakpoint at the at the line where the `emit()` function is called:
62
+
1. Set a breakpoint at the line where the `emit()` function is called:
63
63
64
64

65
65
@@ -74,7 +74,7 @@ Create a Kotlin [flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-corou
74
74
75
75

76
76
77
-
3. Resume the debugger session by clicking **Resumeprogram**in the **Debug** tool window. The program stops at the same breakpoint.
77
+
3. Resume the debugger session by clicking **ResumeProgram**in the **Debug** tool window. The program stops at the same breakpoint.
78
78
79
79

80
80
@@ -101,7 +101,7 @@ Create a Kotlin [flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-corou
101
101
}
102
102
```
103
103
104
-
4. Build the code by clicking **BuildProject**.
104
+
3. Build the code by clicking **BuildProject**.
105
105
106
106
## Debug a Kotlin flow with two coroutines
107
107
@@ -117,7 +117,7 @@ Create a Kotlin [flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-corou
117
117
The `buffer()` function buffers emitted values from the flow.
118
118
The emitter coroutine has the **RUNNING** status, and the collector coroutine has the **SUSPENDED** status.
119
119
120
-
2. Resume the debugger session by clicking **Resumeprogram**in the **Debug** tool window.
120
+
3. Resume the debugger session by clicking **ResumeProgram**in the **Debug** tool window.
0 commit comments