https://kotlinlang.org logo
#intellij
Title
# intellij
v

vdlasov

01/15/2021, 1:18 PM
Hello! It is possible to debug sequence of operators apply to kotlin collection? listOf(1,2,3,4,4).map{}.filter{}.map{}.toSet()
c

christophsturm

01/15/2021, 1:38 PM
Copy code
fun <T> Iterable<T>.tap(): List<T> = map { println(it);it }
listOf(1,2,3,4,4).tap().filter{it%2==0}.tap().map{it*6}.toSet()
you can just put tap() anywhere in the chain and output the current values
v

vdlasov

01/15/2021, 1:54 PM
nice workaround
https://twitter.com/kotlin/status/1086268421619146753 i think i find the tool. i need to add issue. i have internal error when open this window
Screen Shot 2021-01-15 at 5.34.34 PM.png