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/debug-coroutines-with-idea.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,4 +99,11 @@ The tutorial assumes you have prior knowledge of the [coroutines](coroutines-gui
99
99
*The second coroutine has computed its value and disappeared.
100
100
*The third coroutine is calculating the value of `b` – it has the **RUNNING** status.
101
101
102
+
>You can disable a "was optimised out" feature via the `-Xdebug` compiler option.
103
+
>The"was optimised out" feature optimizes variables when you use suspend functions.
104
+
>However, debugging a code with optimized variables is hard because you don't see their values.
105
+
> Be careful: disabling this feature via `-Xdebug` can [cause memory leaks](https://youtrack.jetbrains.com/issue/KT-48678/Coroutine-debugger-disable-was-optimised-out-compiler-feature#focus=Comments-27-6015585.0-0).
106
+
>
107
+
{type="tip"}
108
+
102
109
Using IntelliJ IDEA debugger, you can dig deeper into each coroutine to debug your code.
Copy file name to clipboardExpand all lines: docs/topics/debug-flow-with-idea.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,13 @@ Create a Kotlin [flow](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-cor
102
102
103
103

104
104
105
+
>You can disable a "was optimised out" feature via the `-Xdebug` compiler option.
106
+
>The"was optimised out" feature optimizes variables when you use suspend functions.
107
+
>However, debugging a code with optimized variables is hard because you don't see their values.
108
+
> Be careful: disabling this feature via `-Xdebug` can [cause memory leaks](https://youtrack.jetbrains.com/issue/KT-48678/Coroutine-debugger-disable-was-optimised-out-compiler-feature#focus=Comments-27-6015585.0-0).
0 commit comments