Breakpoints do not work when debugging a Quarkus application with Maven
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### 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=` 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:
```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
Contributor guide
Research direction
Reproduce the issue with a Quarkus Maven project using the `quarkus:dev` goal and the NetBeans Debug project action. Compare the configured `${jpda.address}` and `jpda.listen=maven` flow with the working JPDA socket attachment on port 5005; done means the Debug project icon starts the application and reaches breakpoints without manual attachment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100