diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/FrameVariablesTree.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/FrameVariablesTree.java index 9afbfde4d121..3df80be7866f 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/FrameVariablesTree.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/FrameVariablesTree.java @@ -39,6 +39,7 @@ import com.intellij.debugger.jdi.StackFrameProxyImpl; import com.intellij.debugger.jdi.ThreadReferenceProxyImpl; import com.intellij.debugger.settings.ViewsGeneralSettings; import com.intellij.debugger.ui.impl.watch.*; +import com.intellij.lang.java.JavaLanguage; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Document; @@ -234,6 +235,10 @@ public class FrameVariablesTree extends DebuggerTree { return new Pair, Set>(Collections.emptySet(), Collections.emptySet()); } final PsiFile positionFile = position.getFile(); + if (!positionFile.getLanguage().isKindOf(JavaLanguage.INSTANCE)) { + return new Pair, Set>(visibleVars, Collections.emptySet()); + } + final VirtualFile vFile = positionFile.getVirtualFile(); final Document doc = vFile != null? FileDocumentManager.getInstance().getDocument(vFile) : null; if (doc == null || doc.getLineCount() == 0 || line > (doc.getLineCount() - 1)) {