This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
For a nb.org module I have a unit test which includes ${ant.core.lib} in its classpath, and in Tools > Libraries I have a binding from this JAR to Ant sources (which works for e.g. code completion, go to declaration, and stack traces). I can set a breakpoint in a custom Ant task while debugging the unit test, but when I am on a line log("Some stuff " + arg); which is a call to org.apache.tools.ant.Task.log(String), and press F7, I am just taken into StringBuilder.java; there is no apparent way to step into Task.java (available from Ctrl-B on the method call). I cannot set a breakpoint in Task.java either. The Sources window lists almost everything in the classpath, including src.zip, but not the Ant sources I have configured.
When I tested adding a library to a test in Java project it works fine for me. Can you please provide the location of the nb.org module that you have? Is it somewhere at hg.netbeans.org?
core.netigso/test/unit/src/org/netbeans/core/osgi/OSGiProcess.java