diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java index 07f98ec8c8db..0b983cbb895f 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java @@ -2162,6 +2162,13 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb (context.getSuspendPolicy() == EventRequest.SUSPEND_EVENT_THREAD || isResumeOnlyCurrentThread())) { myThreadBlockedMonitor.startWatching(myContextThread); } + + if (context != null) { + ApplicationManager.getApplication().getMessageBus().syncPublisher(SteppingListener.TOPIC) + .beforeSteppingStarted(context, getSteppingAction()); + } + + if (context != null && isResumeOnlyCurrentThread() && context.getSuspendPolicy() == EventRequest.SUSPEND_ALL diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/SteppingListener.kt b/java/debugger/impl/src/com/intellij/debugger/engine/SteppingListener.kt new file mode 100644 index 000000000000..ec77ebd801d6 --- /dev/null +++ b/java/debugger/impl/src/com/intellij/debugger/engine/SteppingListener.kt @@ -0,0 +1,16 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.debugger.engine + +import com.intellij.util.messages.Topic +import org.jetbrains.annotations.ApiStatus + +@ApiStatus.Internal +interface SteppingListener { + companion object { + @Topic.AppLevel + @JvmField + val TOPIC: Topic = Topic(SteppingListener::class.java, Topic.BroadcastDirection.NONE) + } + + fun beforeSteppingStarted(suspendContext: SuspendContextImpl, steppingAction: SteppingAction) { } +}