I had a similar problem when I needed to debug an OSGI server.
A combination of problems appeared, and after solving them, I could debug well.
I answered this in this thread
By the way, you can try stopping your firewall, in the case of iptables, which you need to do:
service iptables stop
, . , , - , JDebugTool, , Eclipse.
Ant, , javac :
<javac srcdir="..." destdir="..." classpathref="..." debug="true" debuglevel="lines,vars,source" />
Eclipse , :
windows > preferences > Java > compiler -> "Classfile generation" -> check "Add line number attributes to generated class file"