Go to debug-view, try to evaluate variables,will get error: Cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json..
In step 2, if I use mvnDebug tomcat7:run to launch, there will be no problem.
I have compared the vimspector debug log, and find nothing different between jetty:run and tomcat7:run.
Expected behavior
The variable evaluation function as expected.
Versions of relevant software
vim: 8.2.3455 (172)
coc.nvim: latest
coc-java: latest
vimspector: latest
java: both java8 and java11
maven: 3.8.1
Relevant logs and error messages
View the trace logging output for the Java language server:
Set { "java.trace.server": "verbose" } in :CocSettings.
Run the command :CocCommand workspace.showOutput java.
Are there any errors?
!MESSAGE [error response][evaluate]: Cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json..
!STACK 0
com.microsoft.java.debug.core.DebugException: Cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json..
at com.microsoft.java.debug.core.adapter.AdapterUtils.createCompletionException(AdapterUtils.java:257)
at com.microsoft.java.debug.core.adapter.handler.EvaluateRequestHandler.lambda$handle$0(EvaluateRequestHandler.java:147)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json.
at com.microsoft.java.debug.plugin.internal.eval.JdtEvaluationProvider.findJavaProjectByType(JdtEvaluationProvider.java:277)
at com.microsoft.java.debug.plugin.internal.eval.JdtEvaluationProvider.ensureDebugTarget(JdtEvaluationProvider.java:405)
at com.microsoft.java.debug.plugin.internal.eval.JdtEvaluationProvider.evaluate(JdtEvaluationProvider.java:140)
at com.microsoft.java.debug.plugin.internal.eval.JdtEvaluationProvider.evaluate(JdtEvaluationProvider.java:115)
at com.microsoft.java.debug.core.adapter.handler.EvaluateRequestHandler.lambda$handle$0(EvaluateRequestHandler.java:84)
... 7 more
View the Vimspector log :VimspectorShowOutput Vimspector.
Are the any errors?
After running the command :CocCommand java.debug.vimspector.start Do you see a message like [coc.nvim] Java debug server started on port in the output of :messages?
Cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json..
Additional context
Add any other context about the problem here.
Screenshots
If applicable, add screenshots to help explain your problem.
It is fine with tomcat7:run
Describe the issue Could not evaluate variables when debugging web apps using mvnDebug jetty:run, But it is ok when using mvnDebug tomcat7:run.
To Reproduce Steps to reproduce the behavior:
In step 2, if I use mvnDebug tomcat7:run to launch, there will be no problem. I have compared the vimspector debug log, and find nothing different between jetty:run and tomcat7:run.
Expected behavior The variable evaluation function as expected.
Versions of relevant software
Relevant logs and error messages
{ "java.trace.server": "verbose" }
in:CocSettings
.:CocCommand workspace.showOutput java
.:VimspectorShowOutput Vimspector
.:CocCommand java.debug.vimspector.start
Do you see a message like[coc.nvim] Java debug server started on port
in the output of:messages
? Cannot evaluate because of java.lang.IllegalStateException: Cannot evaluate, please specify projectName in launch.json.. Additional context Add any other context about the problem here.Screenshots If applicable, add screenshots to help explain your problem. It is fine with tomcat7:run
It does not work with jetty:run
The sample project: demo-app-1.tar.gz