Using VS Code for Java debugging, there must be projectName
defined in the launch.json file for using the watch-window while debugging.
How to determine and/or define the name of the Java project?
I always get the error message:
Failed to resolve classpath: The project '??' is not a valid java project.
Here my launch.json extract:
"type": "java",
"name": "Debug (Launch)-Application<foo>",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "FooClass",
"args": "",
"projectName": "??",
"windows": {
"classPaths": [
"%CLASSPATH%","C:\\JUnit\\junit-4.12.jar", "C:\\JUnit\\hamcrest-junit-2.0.0.0.jar", "."
]
}