How to update a value in debugger
Answered
Hello.
I've implementation of debugging via GDB/LLDB in IDEA.
In my XStackFrame.computeChildren() implementation I adding variables available at current execution point.
That works but to get some variable values I need additional interaction with debugger.
I would like to update such variable values when the interactions will be completed. Is it possible?
Refresh variables view completely will also do the work but how to do it outside XStackFrame.computeChildren()? I tried
XDebuggerUtilImpl.rebuildTreeAndViews(((XValueContainerNode) node).getTree())
But it seems to be incorrect.
Please sign in to leave a comment.
Hi, updating one node is tricky, to rebuild all views you can call `com.intellij.xdebugger.XDebugSession#rebuildViews`
Thanks for the answer.
XDebugSession.rebuildViews() rebuilding all views starting from threads and stackframes. In that case I should run all queries to debugger from scratch and at the end have the same problem.
Is there a way to refresh only local variables and may be also watches view?
If you have a debugger tree instance, you can do this to rebuild only that:
`tree.rebuildAndRestore(XDebuggerTreeState.saveState(tree));`