Skip to content
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

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

Open
poconnor-lab49 opened this issue May 4, 2022 · 2 comments

Comments

@poconnor-lab49
Copy link

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
Copy link

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:

  • m2e-core: 1.20.1
  • Quarkus tools 4.24

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

  • One attempt is made by QuarkusLaunchConfigurationDelegate:
if ("debug".equals(mode)) {
	createRemoteJavaDebugConfiguration(configuration, debugPort, monitor);
}
  • The other attempt(s) are made by m2e-core. More specifically MavenConsoleLineTracker reads messages printed to the console and when it finds lines matching the expression "Listening for transport dt_socket at address: (\d+)$", it automatically tries to launch a Remote Java Application debug session.

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants