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.
See issue #212286. When debugger is attaching to Paint Application, in JPDAStart.run(), we add BuildListener to getProject(). But after the application finishes it's execution, the BuildListener.buildFinished() method is not called. This method is called correctly, when debugging Java project. To reproduce, run NetBeans with -J-Dorg.netbeans.modules.debugger.jpda.ant.level=400 When you debug AnagrameGame and exit the application, you get following messages: FINE [org.netbeans.modules.debugger.jpda.ant]: buildFinished: waiting for listening start... FINE [org.netbeans.modules.debugger.jpda.ant]: buildFinished: stopping listening... FINE [org.netbeans.modules.debugger.jpda.ant]: buildFinished: interrupting listening thread... FINE [org.netbeans.modules.debugger.jpda.ant]: buildFinished: listening thread = null FINE [org.netbeans.modules.debugger.jpda.ant]: buildFinished: killing session org.netbeans.api.debugger.Session localhost:com.toy.anagrams.ui.Anagrams But when debugging Paint Application, you get no such messages after debugging is finished.
Correct, because you are adding a listener to a subproject (cf. Ant.init and Project.createSubProject), and only the initiating project will fire a build finish event. This logic seems suspect anyway. What if the script calls <jpdastart>, runs a <java fork="true"> program with that debug port, and then begins a four-hour download? Probably you want to pay attention to the actual task during which the debugger server is contacted, and clean up when that task completes (perhaps using an AntLogger).
It's strange that the build listener does not work for the suite project "PaintApp", nor for the project itself "PaintApp/Paint". So perhaps <jpdastart> should accept a task name it will wait for. And after that task is done, it will stop listening.
Integrated into 'main-golden', will be available in build *201205190400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/651970696a1b User: Jesse Glick <jglick@netbeans.org> Log: Additional logging for #212592.