-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json.. #843
Comments
Could you share your steps to launch the tomcat and connect to the debugger? |
Tomcat: Start Tomcat Server |
OK, you're using Tomcat for Java extension to launch debugging. That extension doesn't consume the local launch.json config. Could you take a look at a new extension https://marketplace.visualstudio.com/items?itemName=redhat.vscode-server-connector, it has better support for tomcat server. |
Where should it be the launch.json? The extension that you mention it's not for tomcat, at least it doesn't name it on the supporte list of servers. |
Sorry, i read that is supported, at least minimal requriements. I will check, thanks. |
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further. |
How can i help to get this fix? I add as many information as i could. Could it be a test case? Is easy to reproduce it. |
If you want the case is covered well, at least you should provide detailed reproduce steps and a minimum sample project to reproduce the issue. |
I have same issue and can create a test case. servlet URL GET: when VScode open the folder with two projects it can not evaluate any thing. I need to debug something in the dependency project so I hope this can be fixed. |
Had a similar problem. In my case the solution was to use exactly the same project name as in the file .project. Then it did work. |
Hi: For any newcomers experiencing this issue, an above comment suggests using https://marketplace.visualstudio.com/items?itemName=redhat.vscode-community-server-connector The other extension ( |
@robstryker The community extension works with tomcat as you point out, but I still have the same issue as OP. |
We've had one user report a similar issue here: redhat-developer/rsp-server-community#85 No real solution was found but some of the comments from the user provide a workaround. |
Right-click on a Java file (one without a As you can see in this screenshot of this Ant project, sometimes the project name is unpredictable. See also this answer on StackOverflow |
in my case I ended up using Eclipse for debugging. VS code java debugging sucks |
I was able to remove this error by deleting the projectName property: |
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
Is there anything else that i should change in my launch.json?
The text was updated successfully, but these errors were encountered: