(CoroutineDebugger) Top node added to prevent dumpCoroutine() call

Panel gather information from the agent on each breakpoint hit.
This commit is contained in:
Vladimir Ilmov
2020-07-17 14:49:15 +02:00
parent fa45650fd0
commit cb2ab4676b
2 changed files with 12 additions and 3 deletions
@@ -18,6 +18,7 @@ coroutine.dump.creation.trace=Coroutine creation stack trace
coroutine.dump.threads.loading=Loading…
coroutine.view.node.root=Coroutines
coroutine.view.title=Coroutines
coroutine.view.dispatcher.empty=Empty dispatcher
coroutine.view.fetching.error=An error occurred on fetching information
@@ -135,12 +135,20 @@ class XCoroutineView(val project: Project, val session: XDebugSession) :
inner class EmptyNode : XValueContainerNode<XValueContainer>(panel.tree, null, true, object : XValueContainer() {})
inner class XCoroutinesRootNode(suspendContext: SuspendContextImpl) :
XValueContainerNode<CoroutineGroupContainer>(
XValueContainerNode<CoroutineTopGroupContainer>(
panel.tree, null, false,
CoroutineGroupContainer(suspendContext)
CoroutineTopGroupContainer(suspendContext)
)
inner class CoroutineGroupContainer(val suspendContext: SuspendContextImpl) : XValueContainer() {
inner class CoroutineTopGroupContainer(val suspendContext: SuspendContextImpl) : XValueContainer() {
override fun computeChildren(node: XCompositeNode) {
val children = XValueChildrenList()
children.add(CoroutineGroupContainer(suspendContext))
node.addChildren(children, true)
}
}
inner class CoroutineGroupContainer(val suspendContext: SuspendContextImpl) : RendererContainer(renderer.renderGroup(KotlinDebuggerCoroutinesBundle.message("coroutine.view.node.root"))) {
override fun computeChildren(node: XCompositeNode) {
if (suspendContext.suspendPolicy == EventRequest.SUSPEND_ALL) {
managerThreadExecutor.on(suspendContext).invoke {