'Remote debugging configuration: Java on Netbeans 12

I can successfully deploy and develop java projects remotely from a Windows machine on a RaspberryPi (Raspian). My IDE is Netbeans 12.6 which comes with the option to configure a remote-configuration. The 'standard' setup looks like

Standard remote configuration

Now I need to debug certain parts of the code which is not possible on the local machine. I tried attaching a debugger in "Debug->Attach"

enter image description here

My guess is that there the debugger is only created, since I can not check which configuration is run by the debugger. Running the debugger results in

cmd : cd '/home/pi/java//RaspberryPi'; '/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/bin/java' ${debug-args-line} -Xrunjdwp:transport=dt_socket,address=127.0.0.1:53892 -Dfile.encoding=UTF-8   -jar /home/pi/java//RaspberryPi/dist/RaspberryPi.jar 

where the socket_address mirrors the localhost and not the presumed 'attached debugger'.

The commplete output looks like this

cmd : mkdir -p '/home/pi/java//RaspberryPi/dist'
Connecting to 192.168.4.20:22
done.
profile-rp-calibrate-passwd:
Property "debug-args-line" has not been set
Connecting to 192.168.4.20:22
cmd : cd '/home/pi/java//RaspberryPi'; '/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/bin/java' ${debug-args-line} -Xrunjdwp:transport=dt_socket,address=127.0.0.1:53892 -Dfile.encoding=UTF-8   -jar /home/pi/java//RaspberryPi/dist/RaspberryPi.jar 
Error: Could not find or load main class args-line
<MYDIR>\RaspberryPi\nbproject\remote-platform-impl.xml:133: The following error occurred while executing this line:
<MYDIR>\RaspberryPi\nbproject\remote-platform-impl.xml:83: Remote command failed with exit status 1

the referenced build-xml shows on line 133:

<target 
name="-debug-remote-passwd" depends="init, jar, -init-remote-platform-properties, -copy-to-remote-platform, -ask-password, -debug-start-debugger" if="remote.platform.auth.passwd">
        <addressport address="${jpda.address}" property="jpda.port"/>
        <sshsession host="${remote.platform.host}" port="${remote.platform.port}" username="${remote.platform.user}" password="${remote.platform.password}" trust="true">
            <remotetunnel lport="${jpda.port}" lhost="localhost" rport="${jpda.port}"/>
            <sequential>
                <remote:runwithpasswd additionaljvmargs="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
            </sequential>
        </sshsession>
    </target>

which tries to access 'jpda.address'. This is seems to be still configured to 127.0.0.0 and not my target.

How can I configure the debugger and attach it to my target client?

EDIT: Per suggestion in the comments I added the property argument. Now my build.xml looks like

<?xml version="1.0" encoding="UTF-8"?>
<project name="RaspberryPi" default="default" basedir=".">
    <description>Builds, tests, and runs the project RaspberryPi.</description>
    <import file="nbproject/build-impl.xml"/>
    <property name="debug-args-line" value = " "/>
</project>

After trying to deploy the error persists

<ME>\RaspberryPi\nbproject\remote-platform-impl.xml:133: The following error occurred while executing this line:
<ME>\RaspberryPi\nbproject\remote-platform-impl.xml:83: Remote command failed with exit status 1

This points to the same linenumbers outlined above.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source