title: Kotlin, Android, how to debug coroutines correctly?
body: <p>I'm trying to debug my coroutines, and breakpoints placed into suspend function don't work. Pls help me understand why.</p>
  <p>Working with Android Studio.</p>
  <p>Ok, I launch a coroutine from viewModelScope:</p>
  <pre><code>    viewModelScope.launch(IO) {
          when(val result = interactor.getAllWords()){...}
      }
  </code></pre>
  <p>In <code>getAllWords()</code> I wrote:</p>
  <pre><code>    override suspend fun getAllWords(): WordResult {
          val words = mutableListOf&lt;Word&gt;()
  
          when (val wordsResult = getAllWordsWithoutFiltersApplying()) {}
  
          ...
  
          return getWordsWithSelectedPattern()
  </code></pre>
  <p>I have two suspend functions: <code>getAllWordsWithoutFiltersApplying()</code> and <code>getWordsWithSelectedPattern()</code>. I have a breakpoints into both of them, but they did't trigger in debug mode.</p>
  <p>At the same time, line <code>val words = mutableListOf&lt;Word&gt;()</code> is triggering, when I put breakpoint to its line.</p>
  <p>And, if I put some log stuff into &quot;untracing&quot; function, they will be work. I say it to make it clear, suspend function works. Breakpoints are not.</p>
  <p>What should I do to debug them?</p>
  <p>*Screenshot added. Look at the left side with row of icons. Why my lines are not available?</p>
  <p><a href="https://i.stack.imgur.com/iAJ6X.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iAJ6X.png" alt="enter image description here" /></a></p>