dansomething / coc-java-debug

An extension for coc.nvim to enable Java debugging via jdt.ls
https://www.npmjs.com/package/coc-java-debug
Eclipse Public License 2.0
100 stars 8 forks source link

Getting "No project is available for evaluation" error when debugging web app using mvn jetty:run #37

Closed qianwch closed 2 years ago

qianwch commented 2 years ago

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:

  1. Open the sample project.
  2. run mvnDebug jetty:run
  3. run "CocCommand java.debug.vimspector.start", to open the debugger
  4. Set breakpoint in the NoFoundServlet class.
  5. run curl http://localhost:8080/demo-app-1/fdsfasdfdsa
  6. 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

Relevant logs and error messages

Screenshots If applicable, add screenshots to help explain your problem. It is fine with tomcat7:run

2022-06-01 18 55 37

It does not work with jetty:run

2022-06-01 18 56 18

The sample project: demo-app-1.tar.gz

qianwch commented 2 years ago

It seems like a env problem, I have tested in another computer, it is all ok. It could be a problem of maven 3.8.1.