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.
When I try and debug an ant project, I get the following: /home/quintin/.netbeans/dev/var/cache/executor-snippets/debug.xml:72: java.lang.NullPointerException at org.netbeans.modules.debugger.jpda.ant.JPDAStart.execute(JPDAStart.java:222) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) BUILD FAILED (total time: 0 seconds) All my installations do this. I tried removing the cached debug.xml ant script, tried a new userdir. Nothing helps. Workaround: 1. Open project properties 2. Under the run page enter the following options for "VM Options": -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y 3. Confirm the properties window (press OK) 4. Run your project. It will now wait for a debugger connection 5. On the Debug menu, select Attach Debugger 6. Select the following values for each field: Debugger: Java Debugger (JPDA) Connector: SocketAttach Host: localhost Port: 8000 Timeout: 2000 7. Click OK. The debugger should now attach to the process, and the process will start running.
Re. the workaround I mentioned. It will keep doing that for every run, so create a new run profile with these options called "Debug", and run that profile everytime you wish to debug.
Already fixed, please take a newer build. *** This bug has been marked as a duplicate of bug 176042 ***
verified duplicate