JetBrains/intellij-community · error · EvaluateException
Invalid type name ''{0}''
Error message
Invalid type name ''{0}'' What it means
Error "Invalid type name ''{0}''" thrown in JetBrains/intellij-community.
Source
Thrown at java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/DebuggerTreeNodeExpression.java:143
}
PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
String typeName = type.getCanonicalText();
try {
PsiParenthesizedExpression parenthExpression = (PsiParenthesizedExpression)elementFactory.createExpressionFromText(
"((" + typeName + ")expression)", null);
//noinspection ConstantConditions
((PsiTypeCastExpression)parenthExpression.getExpression()).getOperand().replace(expression);
Set<String> imports = expression.getUserData(ADDITIONAL_IMPORTS_KEY);
if (imports == null) {
imports = new HashSet<>();
}
imports.add(typeName);
parenthExpression.putUserData(ADDITIONAL_IMPORTS_KEY, imports);
return parenthExpression;
}
catch (IncorrectOperationException e) {
throw new EvaluateException(JavaDebuggerBundle.message("error.invalid.type.name", typeName), e);
}
}
/**
* @param qualifiedName the class qualified name to be resolved against the current execution context
* @return short name if the class could be resolved using short name,
* otherwise returns qualifiedName
*/
public static String normalize(final String qualifiedName, PsiElement contextElement, Project project) {
if (contextElement == null) {
return qualifiedName;
}
final JavaPsiFacade facade = JavaPsiFacade.getInstance(project);
PsiClass aClass = facade.findClass(qualifiedName, GlobalSearchScope.allScope(project));
if (aClass != null) {
return normalizePsiClass(aClass, contextElement, facade.getResolveHelper());
}View on GitHub (pinned to be881553f2)
Solutions
- Use a fully qualified, correctly spelled Java type name.
- Ensure the class is on the debuggee's classpath.
Example fix
Use 'java.util.ArrayList' instead of 'Arraylist'.
When it happens
Trigger: A type name entered in a debugger expression cannot be resolved.
Common situations: Misspelled or non-qualified type names in Evaluate Expression or renderer configuration.
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/a7b67426508fcb1d.
Report an issue: GitHub.