https://kotlinlang.org logo
#getting-started
Title
# getting-started
m

Miguel

12/13/2021, 4:05 PM
Hello everyone, can someone help me with this coroutine problem please:
Copy code
private suspend fun suspendFunction() : Boolean { ... }

launch {
    val returnedValue = suspendFunction()
    if (returnedValue) anotherFunction() // this does not fire in the debugger
}
What am I doing wrong?
j

Joffrey

12/13/2021, 4:08 PM
Just FYI, for questions specifically about coroutines, there is a dedicated #coroutines channel. As for this particular question, I wish I could help but I'm not well versed in coroutines debugging. The code looks ok, if the return value of the suspend function is
true
, the
anotherFunction
call should happen. Did you try
println()
to check whether it's a problem with the code or with the debugger?