jbosstools / jbosstools-quarkus

Quarkus tooling for Eclipse
https://tools.jboss.org
Apache License 2.0
16 stars 20 forks source link

Debug Launch reports "Can't connect to JVM" but debugging seems to work fine #176

Open poconnor-lab49 opened 2 years ago

poconnor-lab49 commented 2 years ago

With a Quarkus Run/Debug Application launch configuration the quarkus project runs fine, but if you run in debug mode Eclipse throws an error even though the debugger seems to have already connected. In fact, it seems like the debugger connects whether you choose either Run or Debug, so you don't need to use the debug launch configuration at all?

Looks like the debug connection is already established by Eclipse, so https://github.com/jbosstools/jbosstools-quarkus/blob/main/plugins/org.jboss.tools.quarkus.core/src/org/jboss/tools/quarkus/core/launch/QuarkusLaunchConfigurationDelegate.java#L92 can't connect?

Copy of error

eclipse.buildId=4.23.0.I20220308-0310
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -data /home/redacted -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

org.jboss.tools.quarkus.core
Error
Wed May 04 14:58:48 EDT 2022
Can't connect to JVM
isarantidis commented 1 year ago

Although not blocking I can verify this occurs to me as well. In my case I debugged the code and i found out the following:

Using:

I found that the error message is produced due to multiple attempts to attach to the debug port:

As a result one of the attempts succeeds and therefore debugging works fine, but the other attempts fail and cause the error message(s)

jeffmaury commented 1 year ago

Duplicated as https://issues.redhat.com/browse/JBIDE-28671 as JIRA is the bug management system for JBoss Tools