{"record":{"id":"f315aa0fd4d1ad95","repo":"JetBrains/intellij-community","slug":"invalid-local-variable-name-0","errorCode":null,"errorMessage":"Invalid local variable name ''{0}''","messagePattern":"Invalid local variable name ''(.+?)''","errorType":"exception","errorClass":"EvaluateException","httpStatus":null,"severity":"error","filePath":"java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java","lineNumber":74,"sourceCode":"  }\n\n  @Override\n  public String getName() {\n    return myVariable.getDisplayName();\n  }\n\n  public boolean isParameter() {\n    return myVariable.isParam();\n  }\n\n  @Override\n  public PsiExpression getDescriptorEvaluation(DebuggerContext context) throws EvaluateException {\n    PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(myProject);\n    try {\n      return elementFactory.createExpressionFromText(getName(), PositionUtil.getContextElement(context));\n    }\n    catch (IncorrectOperationException e) {\n      throw new EvaluateException(JavaDebuggerBundle.message(\"error.invalid.local.variable.name\", getName()), e);\n    }\n  }\n\n  @Override\n  public XValueModifier getModifier(JavaValue value) {\n    return new JavaValueModifier(value) {\n      @Override\n      protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) {\n        final DecompiledLocalVariable local = ArgumentValueDescriptorImpl.this.getVariable();\n        if (local != null) {\n          final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext();\n          set(expression, callback, debuggerContext, new SetValueRunnable() {\n            @Override\n            public void setValue(EvaluationContextImpl evaluationContext, Value newValue) throws ClassNotLoadedException,\n                                                                                                 InvalidTypeException,\n                                                                                                 EvaluateException {\n              LocalVariablesUtil.setValue(debuggerContext.getFrameProxy().getStackFrame(), local, newValue);\n              update(debuggerContext);","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java#L56-L92","documentation":"Error \"Invalid local variable name ''{0}''\" thrown in JetBrains/intellij-community.","triggerScenarios":"A watch/evaluate expression refers to a local variable name that is not a legal Java identifier.","commonSituations":"Typing a malformed variable reference into Evaluate Expression or Watches.","solutions":["Use a valid Java identifier for the local variable name.","Avoid keywords, spaces, and characters like '-' or '.' in the variable name."],"exampleFix":"Use 'myValue' instead of 'my-value' in the expression.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}