<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k" -->

---
title: Kotlin beta previews support for coroutine stack trace...
description: JetBrains released Kotlin 2.4.20-Beta2, introducing several experimental features. Key highlights include coroutine stack trace recovery via a new...
canonical: https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Kotlin beta previews support for coroutine stack trace recovery | daily.dev
og:description: JetBrains released Kotlin 2.4.20-Beta2, introducing several experimental features. Key highlights include coroutine stack trace recovery via a new...
og:url: https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k
og:image: https://api.daily.dev/og/posts/zXQcafh1K.png
og:image:alt: Kotlin beta previews support for coroutine stack trace recovery
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Kotlin beta previews support for coroutine stack trace recovery

**[InfoWorld](https://daily.dev/sources/infoworld)** · 3 min read · 2 upvotes · 0 comments

## Summary

JetBrains released Kotlin 2.4.20-Beta2, introducing several experimental features. Key highlights include coroutine stack trace recovery via a new `StackTraceRecoverable` interface, cross-language inheritance in Swift export, a DSL for browser testing in Kotlin/JS, and support for exporting suspend lambdas as JavaScript async functions. Kotlin/Wasm gains Wasmtime runtime support and fixes companion object initialization order to match JVM behavior. Four new collection functions (`allDistinct`, `allDistinctBy`, `allEqual`, `allEqualBy`) simplify checking element equality and uniqueness. The release also debuts the Kotlin compiler native image, offering faster startup as a drop-in replacement for `kotlinc`.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.infoworld.com/article/4202006/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery.html>

## Questions this post answers

### What does the StackTraceRecoverable interface do in Kotlin 2.4.20-Beta2?

It enables coroutine stack trace recovery by letting developers create new exception instances for stack trace recovery without adding a dependency on kotlinx.coroutines. This experimental standard library addition helps debugging when one coroutine throws an exception and another rethrows it, showing where the exception originated and where it was rethrown.

_Track coroutine debugging improvements like stack trace recovery as they mature by following Kotlin releases on daily.dev._

### What changed in Kotlin/Wasm companion object initialization in the 2.4.20-Beta2 release?

Kotlin/Wasm now initializes superclass companion objects before subclass companion objects, matching JVM behavior. Previously the initialization order could be reversed, causing inconsistent behavior between Wasm and JVM targets for the same Kotlin code.

_Developers targeting both JVM and Wasm can catch platform-behavior gotchas like this one on daily.dev._

### Can Kotlin/JS export suspend functions as JavaScript async functions?

Yes, as of Kotlin 2.4.20-Beta2, the compiler supports exporting suspend lambdas as native JavaScript async functions, automatically bridging Kotlin's suspend functions with JavaScript's async/await model. Previously there was no way to export declarations containing suspend lambdas from Kotlin/JS libraries, which is useful for mixed Kotlin/TypeScript codebases.

_Teams mixing Kotlin and TypeScript can follow interop features like this via daily.dev._

## Similar posts on daily.dev

- [Kotlin improves compile-time constants](https://daily.dev/posts/kotlin-improves-compile-time-constants-zfuyb4vn7) · InfoWorld · 0 upvotes · 0 comments
- [Kotlin 2.4.0 Released](https://daily.dev/posts/kotlin-2-4-0-released-mwoy7ksjv) · JetBrains · 9 upvotes · 0 comments
- [Kotlin introduces checker for unused return values](https://daily.dev/posts/kotlin-introduces-checker-for-unused-return-values-vfw3eesrp) · InfoWorld · 0 upvotes · 0 comments
- [Kotlin Weekly \#530](https://daily.dev/posts/kotlin-weekly-530-e9juidset) · Kotlin Weekly · 0 upvotes · 0 comments

---

Tags: [#kotlin](https://daily.dev/tags/kotlin), [#webassembly](https://daily.dev/tags/webassembly), [#jetbrains](https://daily.dev/tags/jetbrains)

[View this post on daily.dev](https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Kotlin beta previews support for coroutine stack trace recovery","url":"https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k"},"datePublished":"2026-07-28T00:58:16.391Z","dateModified":"2026-09-14T08:03:42.754Z","description":"JetBrains released Kotlin 2.4.20-Beta2, introducing several experimental features. Key highlights include coroutine stack trace recovery via a new...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f98a6c08c1061846f2d33d013d7d7fca?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f98a6c08c1061846f2d33d013d7d7fca?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoWorld","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoWorld","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/bf6d68a999064029b0bb09aa6268f1f3","url":"https://daily.dev/sources/infoworld"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kotlin,webassembly,jetbrains","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoWorld","item":"https://daily.dev/sources/infoworld"},{"@type":"ListItem","position":3,"name":"Kotlin beta previews support for coroutine stack trace recovery"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/kotlin-beta-previews-support-for-coroutine-stack-trace-recovery-zxqcafh1k#faq","mainEntity":[{"@type":"Question","name":"What does the StackTraceRecoverable interface do in Kotlin 2.4.20-Beta2?","acceptedAnswer":{"@type":"Answer","text":"It enables coroutine stack trace recovery by letting developers create new exception instances for stack trace recovery without adding a dependency on kotlinx.coroutines. This experimental standard library addition helps debugging when one coroutine throws an exception and another rethrows it, showing where the exception originated and where it was rethrown. Track coroutine debugging improvements like stack trace recovery as they mature by following Kotlin releases on daily.dev."}},{"@type":"Question","name":"What changed in Kotlin/Wasm companion object initialization in the 2.4.20-Beta2 release?","acceptedAnswer":{"@type":"Answer","text":"Kotlin/Wasm now initializes superclass companion objects before subclass companion objects, matching JVM behavior. Previously the initialization order could be reversed, causing inconsistent behavior between Wasm and JVM targets for the same Kotlin code. Developers targeting both JVM and Wasm can catch platform-behavior gotchas like this one on daily.dev."}},{"@type":"Question","name":"Can Kotlin/JS export suspend functions as JavaScript async functions?","acceptedAnswer":{"@type":"Answer","text":"Yes, as of Kotlin 2.4.20-Beta2, the compiler supports exporting suspend lambdas as native JavaScript async functions, automatically bridging Kotlin's suspend functions with JavaScript's async/await model. Previously there was no way to export declarations containing suspend lambdas from Kotlin/JS libraries, which is useful for mixed Kotlin/TypeScript codebases. Teams mixing Kotlin and TypeScript can follow interop features like this via daily.dev."}}]}
```

