https://kotlinlang.org logo
#coroutines
Title
# coroutines
g

ghedeon

01/21/2019, 11:45 PM
Is there any special trick about breakpoints in coroutines? The test is green, but the breakpoint point doesn't stop:
Copy code
@Test
    fun test() {
        runBlocking {
            val channel = produce<Int> { channel.send(42) }
            channel.consumeEach { assertEquals(42, it) } // <--- break point is on this lambda
        }
    }
P.S. I'm using
Dispatchers.setMain()
on android
s

streetsofboston

01/22/2019, 12:02 AM
Same here. It is hit or miss with breakpoints...
e

elizarov

01/22/2019, 12:58 AM
Please, file an issue to http://kotl.in/issue with your test code
👍 1
g

ghedeon

01/22/2019, 9:00 AM
@streetsofboston do you mind to attach your example as well? I'll create an issue with both in the description. Is it also channels related?
2 Views