Debugger: Implement error reporting for evaluator
This commit is contained in:
+9
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.debugger
|
||||
|
||||
import com.intellij.debugger.engine.DebugProcessImpl
|
||||
import com.intellij.debugger.DebuggerContext
|
||||
import com.intellij.debugger.engine.JavaStackFrame
|
||||
import com.intellij.debugger.engine.JavaValue
|
||||
@@ -50,6 +51,7 @@ import org.jetbrains.kotlin.codegen.inline.INLINE_FUN_VAR_SUFFIX
|
||||
import org.jetbrains.kotlin.codegen.inline.isFakeLocalVariableForInline
|
||||
import org.jetbrains.org.objectweb.asm.Type as AsmType
|
||||
import org.jetbrains.kotlin.utils.getSafe
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.KotlinDebuggerEvaluator
|
||||
import java.lang.reflect.Modifier
|
||||
import java.util.*
|
||||
|
||||
@@ -60,6 +62,13 @@ class KotlinStackFrame(frame: StackFrameProxyImpl) : JavaStackFrame(StackFrameDe
|
||||
|
||||
private val kotlinVariableViewService = ToggleKotlinVariablesState.getService()
|
||||
|
||||
private val kotlinEvaluator by lazy {
|
||||
val debugProcess = descriptor.debugProcess as DebugProcessImpl // Cast as in JavaStackFrame
|
||||
KotlinDebuggerEvaluator(debugProcess, this@KotlinStackFrame)
|
||||
}
|
||||
|
||||
override fun getEvaluator() = kotlinEvaluator
|
||||
|
||||
override fun superBuildVariables(evaluationContext: EvaluationContextImpl, children: XValueChildrenList) {
|
||||
if (!kotlinVariableViewService.kotlinVariableView) {
|
||||
return super.superBuildVariables(evaluationContext, children)
|
||||
|
||||
Reference in New Issue
Block a user