[debugger] Add possibility to run debugger suspend helper thread by the debugger agent

It will help to stop the debugger in the "full" state when the evaluation is available in all stopped threads. Also, may be used for good Pause button.

It can be enabled with debugger.run.suspend.helper registry

GitOrigin-RevId: 95a444e3892fba99b10bdc8678557bd1d00bd69b
This commit is contained in:
Alexey Merkulov
2024-03-28 03:17:55 +00:00
committed by intellij-monorepo-bot
parent ddb26ed347
commit d9d260a048
3 changed files with 12 additions and 5 deletions
@@ -7,19 +7,19 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="debugger-agent" type="repository">
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps:debugger-agent:1.2">
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps:debugger-agent:1.9">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/debugger-agent/1.2/debugger-agent-1.2.jar">
<sha256sum>b724610d5798f5dad9c86d7fd3771ce155a0601b6153741e75c4d86fab100d84</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/debugger-agent/1.9/debugger-agent-1.9.jar">
<sha256sum>29a31d2122fb753a7b5e94dcb90a44b84e36f543ac89b1b4f58d345107ffb957</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/debugger-agent/1.2/debugger-agent-1.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/debugger-agent/1.9/debugger-agent-1.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/debugger-agent/1.2/debugger-agent-1.2-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/debugger-agent/1.9/debugger-agent-1.9-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -23,6 +23,7 @@ import com.intellij.openapi.projectRoots.JavaSdkVersion;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.ex.JavaSdkUtil;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.PathUtil;
import com.intellij.util.PathsList;
@@ -247,6 +248,9 @@ public class RemoteConnectionBuilder {
private static String generateAgentSettings(@Nullable Project project) {
Properties properties = CaptureSettingsProvider.getPointsProperties(project);
if (Registry.is("debugger.run.suspend.helper")) {
properties.setProperty("suspendHelper", "true");
}
if (!properties.isEmpty()) {
try {
File file = FileUtil.createTempFile("capture", ".props");
@@ -1140,6 +1140,9 @@ show.method.base.class.in.java.file.structure=true
debugger.enable.breakpoints.during.evaluation=false
debugger.run.suspend.helper=false
debugger.run.suspend.helper.description=Run suspend helper by debug agent
debugger.filter.breakpoints.during.stepping.using.debugger.engine=false
debugger.filter.breakpoints.during.stepping.using.debugger.engine.description=When enabled uses old mechanism to disable all events in other threads during stepping via applying JDI thread filter