(CoroutineDebugger) Added setting to disable coroutine agent
This commit is contained in:
+2
@@ -14,6 +14,8 @@ line.and.lambda.breakpoint=Line and {0,choice,1#Lambda|2#Lambdas} Breakpoints
|
|||||||
|
|
||||||
filter.ignore.internal.classes=Do not step into Kotlin runtime library implementation classes
|
filter.ignore.internal.classes=Do not step into Kotlin runtime library implementation classes
|
||||||
variables.calculate.delegated.property.values=Calculate values of delegated properties (may affect program execution)
|
variables.calculate.delegated.property.values=Calculate values of delegated properties (may affect program execution)
|
||||||
|
variables.disable.coroutine.agent.values=Disable coroutine agent
|
||||||
|
variables.disable.coroutine.agent.tooltip=Disables coroutine agent for Gradle and Java run configurations
|
||||||
|
|
||||||
field.watchpoint.tab.title=Kotlin Field Watchpoints
|
field.watchpoint.tab.title=Kotlin Field Watchpoints
|
||||||
field.watchpoint.properties.access=Field &access
|
field.watchpoint.properties.access=Field &access
|
||||||
|
|||||||
+1
@@ -22,6 +22,7 @@ class KotlinDebuggerSettings : XDebuggerSettings<KotlinDebuggerSettings>("kotlin
|
|||||||
var DEBUG_RENDER_DELEGATED_PROPERTIES: Boolean = false
|
var DEBUG_RENDER_DELEGATED_PROPERTIES: Boolean = false
|
||||||
var DEBUG_DISABLE_KOTLIN_INTERNAL_CLASSES: Boolean = true
|
var DEBUG_DISABLE_KOTLIN_INTERNAL_CLASSES: Boolean = true
|
||||||
var DEBUG_IS_FILTER_FOR_STDLIB_ALREADY_ADDED: Boolean = false
|
var DEBUG_IS_FILTER_FOR_STDLIB_ALREADY_ADDED: Boolean = false
|
||||||
|
var DEBUG_DISABLE_COROUTINE_AGENT: Boolean = false
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getInstance(): KotlinDebuggerSettings {
|
fun getInstance(): KotlinDebuggerSettings {
|
||||||
|
|||||||
+11
-2
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.kotlin.idea.debugger.KotlinDelegatedPropertyRendererConfigurableUi">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.kotlin.idea.debugger.KotlinDelegatedPropertyRendererConfigurableUi">
|
||||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="681" height="400"/>
|
<xy x="20" y="20" width="681" height="400"/>
|
||||||
@@ -17,9 +17,18 @@
|
|||||||
<text resource-bundle="messages/KotlinDebuggerCoreBundle" key="variables.calculate.delegated.property.values"/>
|
<text resource-bundle="messages/KotlinDebuggerCoreBundle" key="variables.calculate.delegated.property.values"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
<component id="5af15" class="javax.swing.JCheckBox" binding="disableCoroutineAgent">
|
||||||
|
<constraints>
|
||||||
|
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text resource-bundle="messages/KotlinDebuggerCoreBundle" key="variables.disable.coroutine.agent.values"/>
|
||||||
|
<toolTipText resource-bundle="messages/KotlinDebuggerCoreBundle" key="variables.disable.coroutine.agent.tooltip"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
<vspacer id="c37da">
|
<vspacer id="c37da">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</vspacer>
|
</vspacer>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
+5
-1
@@ -24,22 +24,26 @@ import javax.swing.*;
|
|||||||
|
|
||||||
public class KotlinDelegatedPropertyRendererConfigurableUi implements ConfigurableUi<KotlinDebuggerSettings> {
|
public class KotlinDelegatedPropertyRendererConfigurableUi implements ConfigurableUi<KotlinDebuggerSettings> {
|
||||||
private JCheckBox renderDelegatedProperties;
|
private JCheckBox renderDelegatedProperties;
|
||||||
|
private JCheckBox disableCoroutineAgent;
|
||||||
private JPanel myPanel;
|
private JPanel myPanel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset(@NotNull KotlinDebuggerSettings settings) {
|
public void reset(@NotNull KotlinDebuggerSettings settings) {
|
||||||
boolean flag = settings.getDEBUG_RENDER_DELEGATED_PROPERTIES();
|
boolean flag = settings.getDEBUG_RENDER_DELEGATED_PROPERTIES();
|
||||||
renderDelegatedProperties.setSelected(flag);
|
renderDelegatedProperties.setSelected(flag);
|
||||||
|
disableCoroutineAgent.setSelected(settings.getDEBUG_DISABLE_COROUTINE_AGENT());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isModified(@NotNull KotlinDebuggerSettings settings) {
|
public boolean isModified(@NotNull KotlinDebuggerSettings settings) {
|
||||||
return settings.getDEBUG_RENDER_DELEGATED_PROPERTIES() != renderDelegatedProperties.isSelected();
|
return settings.getDEBUG_RENDER_DELEGATED_PROPERTIES() != renderDelegatedProperties.isSelected()
|
||||||
|
|| settings.getDEBUG_DISABLE_COROUTINE_AGENT() != disableCoroutineAgent.isSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void apply(@NotNull KotlinDebuggerSettings settings) {
|
public void apply(@NotNull KotlinDebuggerSettings settings) {
|
||||||
settings.setDEBUG_RENDER_DELEGATED_PROPERTIES(renderDelegatedProperties.isSelected());
|
settings.setDEBUG_RENDER_DELEGATED_PROPERTIES(renderDelegatedProperties.isSelected());
|
||||||
|
settings.setDEBUG_DISABLE_COROUTINE_AGENT(disableCoroutineAgent.isSelected());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
+3
-2
@@ -12,6 +12,7 @@ import com.intellij.execution.configurations.RunnerSettings
|
|||||||
import com.intellij.openapi.externalSystem.service.execution.ExternalSystemRunConfiguration
|
import com.intellij.openapi.externalSystem.service.execution.ExternalSystemRunConfiguration
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.xdebugger.XDebuggerManagerListener
|
import com.intellij.xdebugger.XDebuggerManagerListener
|
||||||
|
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerSettings
|
||||||
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
import org.jetbrains.kotlin.idea.debugger.coroutine.util.logger
|
||||||
|
|
||||||
interface DebuggerListener : XDebuggerManagerListener {
|
interface DebuggerListener : XDebuggerManagerListener {
|
||||||
@@ -32,8 +33,8 @@ class CoroutineDebuggerListener(val project: Project) : DebuggerListener {
|
|||||||
): DebuggerConnection? {
|
): DebuggerConnection? {
|
||||||
val isExternalSystemRunConfiguration = configuration is ExternalSystemRunConfiguration
|
val isExternalSystemRunConfiguration = configuration is ExternalSystemRunConfiguration
|
||||||
val isGradleConfiguration = gradleConfiguration(configuration.type.id)
|
val isGradleConfiguration = gradleConfiguration(configuration.type.id)
|
||||||
|
val disableCoroutineAgent = KotlinDebuggerSettings.getInstance().DEBUG_DISABLE_COROUTINE_AGENT
|
||||||
if (runnerSettings is DebuggingRunnerData && !isExternalSystemRunConfiguration && !isGradleConfiguration)
|
if (!disableCoroutineAgent && runnerSettings is DebuggingRunnerData && !isExternalSystemRunConfiguration && !isGradleConfiguration)
|
||||||
return DebuggerConnection(project, configuration, params, runnerSettings)
|
return DebuggerConnection(project, configuration, params, runnerSettings)
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user