List Debug Threads

Enumerate execution stacks (threads) for a suspended debug session.

```kotlin
import com.intellij.xdebugger.XDebuggerManager


val session = XDebuggerManager.getInstance(project).currentSession
    ?: error("No debug session. Start one first.")

if (!session.isSuspended) {
    error("Session is running. Pause it before listing threads.")
}

val suspendContext = session.suspendContext
    ?: error("No suspend context available.")

val stacks = suspendContext.executionStacks
println("Execution stacks:", stacks.size)

stacks.forEach { stack ->
    val topFrame = stack.topFrame
    val position = topFrame?.sourcePosition
    val location = if (position != null) {
        "${position.file.name}:${position.line + 1}"
    } else {
        "<no position>"
    }
    println("Thread:", stack.displayName, "top:", location)
}
```

# See also

Related IDE operations:
- [Run Configuration](mcp-steroid://ide/run-configuration) - List and execute run configs

Related test operations:
- [Run Tests](mcp-steroid://test/run-tests) - Execute test configuration
- [Wait for Completion](mcp-steroid://test/wait-for-completion) - Poll test status

Overview resources:
- [Debugger Skill Guide](mcp-steroid://prompt/debugger-skill) - Essential debugger knowledge
