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 54360 - Debugger 7 times stops at tag directive
Summary: Debugger 7 times stops at tag directive
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Pavlo Tymoshenko
Depends on: 59428
  Show dependency tree
Reported: 2005-02-02 13:27 UTC by Jiri Skrivanek
Modified: 2007-08-01 16:23 UTC (History)
0 users

See Also:
Exception Reporter:

Tag file (781 bytes, text/plain)
2005-02-02 14:01 UTC, Jiri Skrivanek
index.jsp (501 bytes, text/plain)
2005-02-02 14:01 UTC, Jiri Skrivanek

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2005-02-02 13:27:58 UTC
Using 'Step Into' action debugger stops 7 times at
line with '<custom:mytable' and also 7 times at
the beginning of tag file. To reproduce:

- create a tag file and use it in JSP
- add breakpoint to JSP at line with '<custom:mytable'
- start debugger and wait until it stops at breakpoint
- use Step Into action (F7) to continue. It stops
7 or 8 times on the same line
- when you finally step into tag file it again
stops 7 times at the first line

Build 200502012121, JDK1.5.0_02, WindowsXP.
Comment 1 Jiri Skrivanek 2005-02-02 14:01:01 UTC
Created attachment 20147 [details]
Tag file
Comment 2 Jiri Skrivanek 2005-02-02 14:01:31 UTC
Created attachment 20148 [details]
Comment 3 Libor Kotouc 2005-02-21 09:22:29 UTC
It is rather enhancement than a bug. The mapping between generated
Java code and original JSP maps several calls within Java to one line
in JSP page. It is the reason why 'step into' action results several
times in showing the same line in JSP.
The only solution is some kind of smart recognition of the first line
of a non-generated code.
Comment 4 zikmund 2005-05-26 14:03:21 UTC
Idea of solution: on F7 (Step Into) do this algo:
1) Store JSP line
2) Do Step Into
3) Check JSP line
   if it is the same as stored line in step 1, GoTo step 2

Notice: number of cycles 3->2 could be probably limited to some number of passes
in case that there's a bug in JDK/Tomcat/JSP(?).
Comment 5 Libor Kotouc 2005-06-02 09:54:54 UTC
not too difficult to implement; moreover this is quite bothering feature,
increasing to P2 and setting TM to 4.2.
Comment 6 Jaroslav Pospisil 2006-03-13 13:43:07 UTC
TM 5.0->TBD
Comment 7 Marek Fukala 2006-10-24 13:13:35 UTC
Libore, if it is so easy to fix and bothering, shouldn't it be changed back to
defect? Maybe the feature is already fixed ;-)
Comment 8 Libor Kotouc 2006-12-21 16:01:56 UTC
I am afraid that this issue is not as easy fixable as it might look. We cannot
simply use the algorithm suggested by ziki bcs we don't know how many
expressions are on the same line. We rely on the information returned from the
JDI and if it returns the same line number repeatedly, we cannot simply 'skip'
it bcs we might skip some expression a user wants to evaluate.

This is simply not a bug, but a feature; JSR-45 is not perfect.