-
Kotlin Coroutines-debug 예제& 디버깅 Tutorial & 코루틴 가이드코딩Coding/Java&Kotlin 2023. 11. 25. 20:46728x90
디버깅 Tutorial
https://kotlinlang.org/docs/debug-coroutines-with-idea.html#debug-coroutinesDebug coroutines using IntelliJ IDEA – tutorial | Kotlin
kotlinlang.org
메모리 leak?
This text means that the variable's lifetime was decreased, and the variable doesn't exist anymore. It is difficult to debug code with optimized variables because you don't see their values. You can disable this behavior with the -Xdebug compiler option.
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?_gl=1*1dmmmrj*_ga*MTM4ODAyODIwMi4xNzAwOTEyNjYy*_ga_9J976DJZ68*MTcwMDkxMjY2MS4xLjEuMTcwMDkxMzI5NC42MC4wLjA.&_ga=2.9542003.715637141.1700912662-1388028202.1700912662#focus=Comments-27-6015585.0-0Coroutine debugger: disable "was optimised out" compiler feature : KT-48678
I'm getting "was optimized out" way to often. So I would love a compiler feature that it wouldn't optimize these variables out when in debugging Kotlin. Here's an example: image.png Current workaround My usual workaround is stop the program and re-write my
youtrack.jetbrains.com
https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-debug/kotlinx-coroutines-debug
Debugging facilities for kotlinx.coroutines on JVM. Overview This module provides a debug JVM agent that allows to track and trace existing coroutines. The main entry point to debug facilities is DebugProbes API. Call to DebugProbes.install installs debug
kotlinlang.org
https://github.com/reactor/BlockHound/blob/1.0.8.RELEASE/docs/quick_start.md[Kotlin Coroutines] Log 를 사용한 Coroutines 디버깅
로그를 사용한 디버깅의 필요성 Kotlin Coroutines는 같은 Coroutine Builder(launch, async 등) 의 중괄호 내부의 코드들이 다른 스레드에서 실행될 수 있다. 예를 들어 아래 코드에서 "task1 : start" 는 메인 스
kotlinworld.com
[kotlin] 코틀린의 코루틴 가이드(1)
코틀린 코루틴 가이드를 잘 번역해주신 블로그입니다. 아래 블로그 내용으로 공부를 해서 원본 내용은 아래 링크 참고 바랍니다. https://medium.com/@myungpyo/reading-coroutine-official-guide-thoroughly-part-0-2017
12bme.tistory.com
https://stackoverflow.com/questions/59345012/kotlin-android-how-to-debug-coroutines-correctlyKotlin, Android, how to debug coroutines correctly?
I'm trying to debug my coroutines, and breakpoints placed into suspend function don't work. Pls help me understand why. Working with Android Studio. Ok, I launch a coroutine from viewModelScope:
stackoverflow.com
다른글 보기
코틀린 문법 총 정리 - https://economiceco.tistory.com/m/19102코틀린 문법 총 정리
https://youtu.be/OtHkb6wAI5U?si=Qr1DbF3g2bEArqAX 코틀린 철학 알아보기 코드스피츠90 - 코틀린 언어편 1회차 | 코드스피츠 https://youtu.be/1OzBh2Uuj2s?si=DD_lptSyKvJ5FEJN 영상 모아보기 https://youtube.com/playlist?list=PLBNdLLa
economiceco.tistory.com
반응형'코딩Coding > Java&Kotlin' 카테고리의 다른 글
Architecture of Netflix (2) 2024.12.06 Android Development Full Course 2023 | Kotlin Tutorial | Complete Tutorial (0) 2023.11.25 코틀린 문법 총 정리 (2) 2023.11.25 개고생하면서 배우는 Kotlin 집중 분석 003_Divided&Conquer(helix, Android Studio Debugging) (0) 2023.11.24 유료$)간편결제 프로젝트로 한 번에 끝내는 실전MSA 초격차 패키지 Online (0) 2023.10.28 Java 21… and Beyond (0) 2023.10.14 Service Mesh for Kotlin Developers | Kotlin by JetBrains (0) 2023.10.11 Java @Pathvariable, @RequestParam, @Param (2) 2023.10.01