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: src/pages/news/gsoc-2023-parallel-stacks/index.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ Upon initiating the IntelliJ IDEA debugger and encountering a breakpoint, an app
19
19
20
20
## Coroutine Stacks
21
21
22
-
Here is a code sample with multiple coroutines:
22
+
Consider the following code sample with multiple coroutines:
23
+
23
24
```kotlin
24
25
importkotlinx.coroutines.*
25
26
@@ -42,25 +43,26 @@ fun main() = runBlocking<Unit> {
42
43
```
43
44
44
45
Let’s add a breakpoint on the following line:
46
+
45
47

46
48
47
-
To open the Coroutine Stacks panel, click in the bottom right-hand corner of your main IDE panel:
49
+
To open the **Coroutine Stacks** panel, click in the bottom right-hand corner of your main IDE panel:
48
50
49
51

50
52
51
53
After the debugger stops at the breakpoint and opens the panel, you will see something like this:
52
54
53
55

54
56
55
-
The Coroutine Stacks panel shows a graphical representation of different stack traces from different coroutines.
57
+
The **Coroutine Stacks** panel shows a graphical representation of different stack traces from different coroutines.
56
58
57
-
From the image above, it is clear that we have two coroutines in our application. Their stack traces share a number of frames up until resumeWith. After that, the control flow of these coroutines diverges. The stack trace with the blue border refers to the coroutine that contains the current breakpoint. The frames highlighted in yellow come from libraries. You can hide library frames by clicking the filter button:
59
+
From the image above, it is clear that there are two coroutines in the application. Their stack traces share a number of frames up until resumeWith. After that, the control flow of these coroutines diverges. The stack trace with the blue border refers to the coroutine that contains the current breakpoint. The frames highlighted in yellow come from libraries. You can hide library frames by clicking the filter button:
58
60
59
61

60
62
61
-
Now we can see that the stack traces of the two running coroutines only have library frames in common.
63
+
Now you can see that the stack traces of the two running coroutines only have library frames in common.
62
64
63
-
In the example, all coroutines are running on the same dispatcher, but you can switch the dispatcher by using the dropdown menu at the top of the panel:
65
+
In the example, all coroutines are running on the same dispatcher, but you can switch the dispatcher by using the dropdown menu at the top of the panel:
64
66
65
67

66
68
@@ -85,15 +87,15 @@ You can click on the frames to navigate to the corresponding source code positio
85
87
## Installation
86
88
87
89
1. Go to **Settings / Preferences** | **Plugins** in IntelliJ IDEA.
88
-
2. Switch to **Marketplace** and search for **Coroutine Stacks**.
89
-

90
-
3. Select the plugin and click Install.
90
+
2. Switch to **Marketplace** and search for **Coroutine Stacks**:
91
+
92
+

93
+
94
+
3. Select the plugin and click **Install**.
91
95
4. After the installation has been completed, restart the IDE.
92
96
93
-
## Feel free to contribute!
97
+
## Feel Free to Contribute!
94
98
95
-
This is just the beginning! With new ideas and features, we can improve the tool to cover more use cases. If you’ve found a bug, don’t like how a feature works, or have other feedback, feel free to open an issue in our official GitHub repository:
This is just the beginning! With new ideas and features, we can improve the tool to cover more use cases. If you’ve found a bug, don’t like how a feature works, or have other feedback, feel free to open an issue in our official GitHub repository: [https://github.com/nikita-nazarov/coroutine-stacks](https://github.com/nikita-nazarov/coroutine-stacks)
97
100
98
101
Thank you to Raehat and Nikita for building an awesome new tool to help developers be more productive!
0 commit comments