This procedure describes how to attach the NetBeans graphical Java debugger (JPDA).
If you want to set line breakpoints, open the project you deployed on the connected device in NetBeans.
Select Debug > Attach Debugger.
In the Attach window, choose Java Debugger (JPDA) and click OK. You are prompted for connection settings
Host: localhost, or leave as is
Port: the port number of the device running in debug mode.
The debugger attaches to the device.