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
You can get the full code [here](../../kotlinx-coroutines-core/jvm/test/guide/example-basic-02.kt).
108
+
> You can get the full code [here](../../kotlinx-coroutines-core/jvm/test/guide/example-basic-02.kt).
109
+
>
110
+
{type="note"}
109
111
110
112
<!--- TEST
111
113
Hello
112
114
World!
113
115
-->
114
116
115
-
> If you use `suspend` functions, in the debugger, you might see the "was optimised out" text next to a variable's name:
116
-
> 
117
-
> This text means that the variable's lifetime was decreased, and the variable doesn't exist anymore.
118
-
> Debugging code with optimised variables is hard because you don't see their values.
119
-
> You can disable this behavior with the `-Xdebug` compiler option.
117
+
## Debug suspend functions
118
+
119
+
If you use `suspend` functions, in the debugger, you might see the "was optimised out" text next to a variable's name:
120
+
121
+

122
+
123
+
This text means that the variable's lifetime was decreased, and the variable doesn't exist anymore.
124
+
Debugging code with optimised variables is hard because you don't see their values.
125
+
You can disable this behavior with the `-Xdebug` compiler option.
126
+
120
127
> __Never use this flag in production__: `-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