redhat-developer / redhat-developer/vscode-quarkus
debugging a quarkus java project is failing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 79
- Forks
- 31
- Avg merge
- 12h 51m
- Merged PRs (30d)
- 6
Description
Hi,
we have a repo working in eclipse and want to use vscode instead of eclipse...
to get rid of this error i need to modify the pom.xml (insert build tag inclusive plugins)
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>zzzz-business-services</artifactId>
<groupId>at.tt.iii</groupId>
<version>1.2.0-SNAPSHOT</version>
<name>rrr-lttt-process-services</name>
<parent>
<artifactId>eeeee-business</artifactId>
<groupId>at.xx.ttt</groupId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<!--
<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<parameters>${maven.compiler.parameters}</parameters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-sources</id>
<phase>validate</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/target/gen/openapi/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
-->
<properties>
<software.module.name>root-zzz-process-services</software.module.name>
</properties>
<dependencies>
<!--add when consuming clients -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<!-- DB2-Zugriffe -->
<dependency>
<groupId>at.fff.quarkus.extensions</groupId>
<artifactId>quarkus-bbbb-db2</artifactId>
<version>${bbbb-quarkus.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-db2</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-devservices-db2</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
</dependencies>
</project>
In eclipse there is a launch script which has an Attribute which seems to be the key (avoid changing the pom.xml file, "VM_CONNECTOR_ID")
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.remoteJavaApplication">
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/myservice"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ALLOW_TERMINATE" value="false"/>
<mapAttribute key="org.eclipse.jdt.launching.CONNECT_MAP">
<mapEntry key="hostname" value="localhost"/>
<mapEntry key="port" value="5005"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="xxxx-business-services"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_CONNECTOR_ID" value="org.eclipse.jdt.launching.socketAttachConnector"/>
</launchConfiguration>
I am not sure if this is a quarkus only problem, but i am not sure how to provide theses attributes like in eclipse.
(Another option maybe would be installing the plugins without adding them to the pom.xml, but that would be a lesser attractive option IMHO).
All extensions are up to date, WIN 10
relevant vscode settings:
"http.proxy": "http://myproxy.at:8080",
"java.jdt.ls.java.home": "c:\\mypath\\jdk\\17.0.2",
"quarkus.tools.debug.terminateProcessOnExit": "Always terminate",
Maybe related, or similar to https://github.com/microsoft/vscode-maven/issues/757#issuecomment-961670609
or https://github.com/microsoft/vscode-java-debug/issues/1382
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the debugging failure with the provided pom.xml, Eclipse launch configuration, and relevant VS Code settings. Compare how the Java debug entry point handles the VM_CONNECTOR_ID, port 5005, and the Quarkus Maven setup, then review the linked vscode-maven and vscode-java-debug issues. Done means the project can be debugged in VS Code without manually adding the commented build plugins to pom.xml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100