apache / apache/netbeans

Unable to perform remote debugging

Open
#5,979 0 comments 0 reactions 0 assignees View on GitHub
Ant kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 17

### What happened

I am unable to start remote debugging because NetBeans produces a wrong command line for it. In the output window I see the following command line and error message:

cmd : cd '/Users/administrator/testdir/NetBeansProjects//JavaApplication1'; '/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/java' ${debug-args-line} -Xrunjdwp:transport=dt_socket,address=localhost:56072 -Dfile.encoding=UTF-8 -jar /Users/administrator/testdir/NetBeansProjects//JavaApplication1/dist/JavaApplication1.jar
Fehler: Hauptklasse args-line konnte nicht gefunden oder geladen werden
Ursache: java.lang.ClassNotFoundException: args-line

It seems like NetBeans produces a command line which contains a "${debug-args-line}" which will not be resolved by Ant.

### How to reproduce

1. Create an Ant Java project
2. Edit the project settings to add a new configuration
3. Add a new remote platform (if you are on a NonWindows system, you might use your localhost with default SSH port if ssh is enabled) - make sure to properly configure the remote platform
4. Start debugging
You will notice this error after starting to debug as it will be thrown into the Output tab

### Did this work correctly in an earlier version?

Apache NetBeans 12.6 or earlier

### Operating System

macOS 13.4 aarch64

### JDK

11.0.19, OpenJDK, aarch64

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

Workaround: if I open the build.xml file of my project in NetBeans and define the property debug-args-line with an empty value (like ) it will start working.

I've noticed that this issue was known in the old NetBeans Jira: https://issues.apache.org/jira/browse/NETBEANS-1425
However this issue has not been migrated to Github and surely has not been fixed since the initial report.

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Reproduce the remote-debugging failure with an Ant Java project and inspect the generated command and the project's build.xml, using the linked NETBEANS-1425 report for context. Trace where the debug-args-line property is expected to be defined; done means starting remote debugging no longer passes an unresolved ${debug-args-line} placeholder to Java.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.