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.

Bug 73392 - Debug File should not restart debugger!
Summary: Debug File should not restart debugger!
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on: 76782
Blocks:
  Show dependency tree
 
Reported: 2006-03-08 16:52 UTC by ssoong
Modified: 2016-07-07 08:55 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
UOE (2.09 KB, text/plain)
2007-08-09 13:17 UTC, Pavlo Tymoshenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ssoong 2006-03-08 16:52:05 UTC
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.
Comment 1 Libor Kotouc 2006-03-08 17:10:33 UTC
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.
Comment 2 ssoong 2006-03-09 13:13:24 UTC
Oops... typo
"I am currently using 20060315"
should have been
"I am currently using 20060305".
Comment 3 Libor Kotouc 2006-03-09 13:26:23 UTC
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.
Comment 4 Petr Pisl 2006-03-20 10:17:55 UTC
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.
Comment 5 Libor Kotouc 2006-05-24 13:27:42 UTC
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
Comment 6 Libor Kotouc 2006-05-24 15:13:22 UTC
Fixed also for Run/Debug EAR projects
Comment 7 Libor Kotouc 2006-05-24 16:12:18 UTC
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
Comment 8 Andrei Badea 2006-05-29 15:12:18 UTC
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">
Comment 9 Libor Kotouc 2006-05-30 15:10:41 UTC
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
Comment 10 Jiri Skrivanek 2006-06-21 14:56:52 UTC
Verified.
Comment 11 ssoong 2006-11-28 23:25:00 UTC
nb5.5 20061117 0100/JDK1.5
==========================
I don't think the issue is resolved.
Comment 12 ssoong 2006-11-28 23:31:14 UTC
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.
Comment 13 ssoong 2006-11-28 23:32:59 UTC
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.
Comment 14 Pavlo Tymoshenko 2007-08-09 13:17:39 UTC
Created attachment 46400 [details]
UOE
Comment 15 Pavlo Tymoshenko 2007-08-09 13:19:07 UTC
sorry, last attach come here by mistake.
Comment 16 Petr Hejl 2007-11-01 11:34:09 UTC
The use case reporter describes in desc14 is enhancement in fact.
Comment 17 Martin Balin 2016-07-07 08:55:20 UTC
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