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.
This issue has been bugging (as well as, debugging) me since version 4. I cannot recall if version 3 behaves similarly. I am currently using 20060315. In JBuilder, when I right-click to debug a JSP, it would not attempt to restart debugger if debugger is already running. However, NB would request(in fact, force) response from programmer to force restart of debugger when I right-click to debug a JSP. "JSP/Servlet debuggin is not available right now because another ..... IDE will ... close the session and start a new one." Therefore, in order to debug another JSP, I would have to figure out the URL and key it into IE URL manually. NB's behaviour is undesirable, because I (and certainly most J2EE programmers) have complex hierarchy of JSPs with very long URLs over multiple projects. I have to figure out and key those URLs in directly? Already fazed by the absence of project grouping and multi-pane editing, having to key in URLs of multiple co-operating application projects adds to the stress level of programming considerably. Perhaps, there might be an option to be set not to restart debugger - but I am unable to locate such an option.
It is definitelly not P1 and it is not defect because it is intentional. We can perhaps talk about lower priority enhancement. The solution is not as trivial as it may look. I will write more about it later.
Oops... typo "I am currently using 20060315" should have been "I am currently using 20060305".
I have tried to make some changes in the build-impl.xml and run nbjpdaconnect task only when some Ant variable is set. Variable setting must be done at several places in the source code but it seems not to be as difficult as I expected. The problem can be workarounded by creating new target from the debug target with nbjpdaconnect deleted (let say debug-do-not-connect). Of course the target like debug-single must be also copied (let say debug-single-do-not-connect) and the copy must call debug-do-not-connect target. After first running of debug action (F5) you can manually run debug-single-do-not-connect from the contextual menu of the build script whenever the JSP page must be run or debug-do-not-connect when the whole archive must be redeployed.
I think, this is defect from user view. It's really annoying to debug file and always restart the debugger. I agree this is not P1, but defect yes.
This fix works for Web and EJB modules, the actions involved are Run/Debug Project/File. Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl; /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.49.16.4.2.10; previous revision: 1.49.16.4.2.9 done Checking in web/project/src/org/netbeans/modules/web/project/WebActionProvider.java; /cvs/web/project/src/org/netbeans/modules/web/project/WebActionProvider.java,v <-- WebActionProvider.java new revision: 1.73.2.3.2.1; previous revision: 1.73.2.3 done Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarActionProvider.java; /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarActionProvider.java,v <-- EjbJarActionProvider.java new revision: 1.20.2.3.2.2; previous revision: 1.20.2.3.2.1 done Checking in web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl; /cvs/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.100.12.6.2.30; previous revision: 1.100.12.6.2.29 done
Fixed also for Run/Debug EAR projects
Checking in EarActionProvider.java; /cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarActionProvider.java,v <-- EarActionProvider.java new revision: 1.8.2.1.2.2; previous revision: 1.8.2.1.2.1 done Checking in resources/build-impl.xsl; /cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.19.36.8; previous revision: 1.19.36.7 done
The fix in the build script seems unnecessarily complicated. You can remove the check-connect-debugger target and just: <target name="connect-debugger" unless="is.debugged">
ok, simplified Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl; /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.49.16.4.2.12; previous revision: 1.49.16.4.2.11 done Checking in web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl; /cvs/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.100.12.6.2.32; previous revision: 1.100.12.6.2.31 done Checking in build-impl.xsl; /cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.19.36.9; previous revision: 1.19.36.8 done
Verified.
nb5.5 20061117 0100/JDK1.5 ========================== I don't think the issue is resolved.
I had a "init.jspx" on debug mode already. While init.jspx was running in a polling loop, I tried to invoke debugging on another jsp "jxinit.jsp". I had a init.jspx put into debug mode and it was in a polling loop. There were not any active break points. It was not on break but continuously writing to System.out as well as occasionally (depending on what it encountered in the loop) using URLConnection to trigger jsps within the IDE's tomcat server - actually, to occasionally trigger an async update of a proxied Laszlo persistent connection. (Updating a Laszlo persistent connection requires http request to be posted to the Laszlo proxy.) This was what I encountered: Nov 28, 2006 5:31:44 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 1 instance(s) to be deallocated The debugging of the second url would not start until it could deallocate init.jspx. This is as good as restarting the debugger.
If while http://localhost/project/init.jspx was running in a loop, I had keyed in the url http://localhost/project/jxinit.jsp in a new browser pane, NB would oblige to invoke jxinit.jsp and I would be happily debugging jxinit.jsp while init.jspx was running. What I needed is/was - that while debug mode is active and if I right clicked on a jsp/jspx at the project explorer, it should emulate as though I am keying into the browser url the path of that jsp/jspx without attempting to deallocate or stop any current debugging session. Without doing any extra behind-my-back tasks. Don't want any buy-one-get-other-stuffs-free. Simply this - when I right click on jsp, IDE resolves the URL of the jsp, copies it as a string and transfers it to the browser URL invocation. Nothing more - no stopping any tomcat or debugger or deallocating any resource or servlet instance.
Created attachment 46400 [details] UOE
sorry, last attach come here by mistake.
The use case reporter describes in desc14 is enhancement in fact.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss