Debugger: use intellij method to invoke method (should mute breakpoint during invocation)

This commit is contained in:
Natalia Ukhorskaya
2014-12-22 18:13:06 +03:00
parent 8896aa93b4
commit 704f8d1446
@@ -37,6 +37,7 @@ import com.sun.jdi.InvocationException
import com.sun.jdi.Method
import org.jetbrains.jet.codegen.PropertyCodegen
import org.jetbrains.jet.lang.resolve.name.Name
import com.intellij.debugger.engine.evaluation.EvaluateException
public class KotlinClassWithDelegatedPropertyRenderer : ClassRenderer() {
@@ -76,10 +77,10 @@ public class KotlinClassWithDelegatedPropertyRenderer : ClassRenderer() {
val threadReference = context.getSuspendContext().getThread()?.getThreadReference()
if (method != null && threadReference != null) {
val propValue = try {
value.invokeMethod(threadReference, method, listOf(), context.getSuspendContext().getSuspendPolicy())
context.getDebugProcess().invokeInstanceMethod(context, value, method, listOf(), context.getSuspendContext().getSuspendPolicy())
}
catch(e: InvocationException) {
e.exception()
catch(e: EvaluateException) {
e.getExceptionFromTargetVM()
}
if (propValue != null) {
val delegatedPropertyDescriptor = DelegatedPropertyFieldDescriptor(