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

Breakpoints do not work when debugging a Quarkus application with Maven #7960

Open
hermanbarrantes opened this issue Nov 13, 2024 · 0 comments
Labels
kind:feature A feature request needs:triage Requires attention from one of the committers

Comments

@hermanbarrantes
Copy link

Apache NetBeans version

Apache NetBeans 23

What happened

If you want to run the debugger and see some things, Netbeans prompts me for the main class

Quarkus projects do not have a main class, Quarkus projects with Maven are run with the quarkus:dev goal

I changed in the project properties, Actions -> Run project

  • Execute Goals: quarkus:dev
  • Active Profiles:
  • Set properties:

And I was able to run the project

I tried to do something similar with debugging

The Quarkus documentation indicates that port 5005 is used, but this can be changed with the -Ddebug=<port number> flag
https://quarkus.io/guides/maven-tooling#debugging

I noticed that Netbeans uses a random port which can be obtained with ${jpda.address}

Then I changed in the project properties, Actions -> Debug project

  • Execute Goals: quarkus:dev -Ddebug=${jpda.address}
  • Active Profiles:
  • Set properties:
exec.vmArgs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${jpda.address}
jpda.listen=maven
exec.executable=java

However, it never reaches the breaking point.

Language / Project Type / NetBeans Component

Java Debugger (JPDA)

How to reproduce

  1. Create Quarkus maven project using either Quarkus website or Quarkus CLI
  2. Open the project in NetBeans
  3. Try to debug the project
  4. Modify the properties as I described above
  5. Try debugging the project again
  6. It never reaches the breaking point

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11 Version 24H2 (Compilation SO 26100.2161) x64 bit

JDK

OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS) x64 bit

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

If I run the application with the target quarkus:dev, which by default uses port 5005 with transport dt_socket and then in the debug icon -> Attach Debugger... in the window I put:

  • Debugger: Java Debugger (JPDA)
  • Connector: Scoket Attach (Attaches by socket to other VMs)
  • Transport: dt_socket
  • Host: localhost
  • Port: 5005
  • Timeout [ms]:

In that case the debugger works without problems
However, it is more convenient to run from the Netbeans debug icon, without the need for these extra steps

Are you willing to submit a pull request?

No

@hermanbarrantes hermanbarrantes added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Nov 13, 2024
@matthiasblaesing matthiasblaesing added kind:feature A feature request and removed kind:bug Bug report or fix labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature A feature request needs:triage Requires attention from one of the committers
Projects
None yet
Development

No branches or pull requests

2 participants