microsoft / microsoft/vscode-java-debug

cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json..

Open
#843 17 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged evaluation question
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

I cannot evaluate an expression in VSCode debugging tomcat.

I have this error.
cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json..

My launch.json

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch) - Current File",
"projectName": "My API",
"request": "launch",
"mainClass": "${file}"
}
]
}

Environment
  • Operating System: Windows 10
  • JDK version: 11
  • Visual Studio Code version: 1.46.1
  • Java extension version: v0.9.1
  • Java Debugger extension version: v0.26.0

Is there anything else that i should change in my launch.json?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing expression evaluation with the provided launch.json on Windows 10, JDK 11, VS Code 1.46.1, and the listed Java extensions. Review the 17-comment thread for any confirmed behavior or workaround; done means evaluation works with a documented configuration or the remaining failure is isolated.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.