diff --git a/python/src/com/jetbrains/python/debugger/PyDebugProcess.java b/python/src/com/jetbrains/python/debugger/PyDebugProcess.java index ba5a89855f3d..3a4ebd458589 100644 --- a/python/src/com/jetbrains/python/debugger/PyDebugProcess.java +++ b/python/src/com/jetbrains/python/debugger/PyDebugProcess.java @@ -33,6 +33,8 @@ import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.platform.debugger.impl.shared.proxy.XDebugSessionProxy; +import com.intellij.platform.debugger.impl.ui.XDebuggerEntityConverter; import com.intellij.psi.PsiElement; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.remote.RemoteSdkException; @@ -51,13 +53,12 @@ import com.intellij.xdebugger.breakpoints.XBreakpointHandler; import com.intellij.xdebugger.breakpoints.XBreakpointType; import com.intellij.xdebugger.breakpoints.XLineBreakpoint; import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider; -import com.intellij.xdebugger.frame.XCompositeNode; -import com.intellij.xdebugger.frame.XDebuggerTreeNodeHyperlink; -import com.intellij.xdebugger.frame.XExecutionStack; -import com.intellij.xdebugger.frame.XStackFrame; -import com.intellij.xdebugger.frame.XSuspendContext; -import com.intellij.xdebugger.frame.XValueChildrenList; -import com.intellij.xdebugger.frame.XValueNode; +import com.intellij.xdebugger.frame.*; +import com.intellij.xdebugger.impl.XDebugSessionImpl; +import com.intellij.xdebugger.impl.frame.XDebugView; +import com.intellij.xdebugger.impl.frame.XFramesView; +import com.intellij.xdebugger.impl.ui.XDebugSessionTab; +import com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl; import com.intellij.xdebugger.impl.ui.XDebuggerUIConstants; import com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeEx; import com.intellij.xdebugger.stepping.XSmartStepIntoHandler; @@ -1201,6 +1202,28 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr if (breakpoint != null) { // Hit a breakpoint while already suspended. We have to remember it and stop on this breakpoint later. myBreakpointHits.add(new BreakpointHitContext(breakpoint, threadInfo.getMessage(), suspendContext)); + } else { + XDebugSession session = getSession(); + if (!(session instanceof XDebugSessionImpl sessionImpl)) { + // If possible (it is XDebugSessionImpl, which currently is only implementation of XDebugSession), + // we want to rebuild only frames view + // But just in case, if in the future there is other implementation, + // we rebuild all debug views + session.rebuildViews(); + return; + } + XDebugSessionTab tab = sessionImpl.getSessionTab(); + if (tab == null) { + return; + } + XFramesView framesView = tab.getFramesView(); + if (framesView == null) { + return; + } + + XDebugSessionProxy sessionProxy = XDebuggerEntityConverter.asProxy(sessionImpl); + framesView + .processSessionEvent(XDebugView.SessionEvent.SETTINGS_CHANGED, sessionProxy); } } }