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.
I am quite confident to say that this used to work just fine. While debugging a jsp page, when hovering woith the mouse over a variable, its contents would be shown. However, since I upgraded to NB 5.0, I no longer have this useful feature and have to activate the local variables window to see the contents of any variable in the current scope.
Can you please verify this feature in one of the NetBeans 5.5 builds? There were two issues fixed at the end of the last year (if you are interested, see the issue 66850 and the issue 67277. If the problem still persists, please attach the JSP file where you have the problem, also provide JDK version and the steps to reproduce (the part of the JSP page text being selected).
no response from the reporter for a long time.
Sorry for the long delay. The problem still exists in NB 5.5 Here's a small JSP page that you can use to reproduce: <%@page language="java" import="java.net.InetAddress"%><% String thisServer = InetAddress.getLocalHost().getHostAddress(); String thisPath = request.getRequestURI(); String thisPort = String.valueOf(request.getServerPort()); String baseURL = "http://" + thisServer + ":" + thisPort + thisPath; String basePath = baseURL.substring(0, baseURL.lastIndexOf("/")) + "/"; out.println("The base url is " + baseURL); out.println("the base path is " + basePath); %> Set a breakpoint at any line, and hover over any of the variables.. you'll get nothing. As mentioned, the bug has existed since NB5 so I've gone through a bunch of JDKs - currently I'm using jdk1.5.0_09.
works pretty fine
I'm afraid I cannot concurr with that assessment... I just installed 6.0 beta 2 and I still don't have the usual variable value display when overing over any of my variables in the test document (thisServer, thisPath, thisPort, baseURL or basePath)
The functionality works in NB 6.5 trunk build with GlassFish V2. Closing as WORKSFORME, reporter please feel free to reopen if you still have problems with it...
This may have something to do with it.. you're using Glassfish.. I'm using Tomcat (at the time I'm writing this 6.0.16). Can you check if it also works (with my sample page) using Tomcat that comes bundled with Netbeans?
Will check it with Tomcat later today... and will update this issue.
Now it does not work for me either... :-( I do not see variable values with Tomcat nor with Glassfish... Product Version: NetBeans IDE Dev (Build 200809040201) Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Product Version: NetBeans IDE Dev (Build 080926) Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Works fine for me after changing the example little bit (insert enter after @page tag: <%@page language="java" import="java.net.InetAddress"%> <% String thisServer = InetAddress.getLocalHost().getHostAddress(); String thisPath = request.getRequestURI(); String thisPort = String.valueOf(request.getServerPort()); String baseURL = "http://" + thisServer + ":" + thisPort + thisPath; String basePath = baseURL.substring(0, baseURL.lastIndexOf("/")) + "/"; out.println("The base url is " + baseURL); out.println("the base path is " + basePath); %> After this change I can see all variables. Reporter, can you confirm this behavior?
I can confirm this behavior even with the release NB 6.1.. I also tried it on some of my more complex JSP files and it still works. Since the resulting JSP file is correct in both cases I take it that it's still an NB issue but knowing the behavior is different if there's an enter hopefully will help in narrowing down what is going wrong.
Created attachment 72626 [details] null value on jsp debug (NB 6.5 RC1)
Created attachment 72628 [details] non-null value on jsp debug (NB 6.5 M1)
IN 6.5 this used to work for me in Milestone 1 with no problems. Same code, same app, same process does not work in RC1, and did not work in the October 10 development version I have. When I hover the mouse over a variable, it shows ()null. Watches do not work either, they always show null values. They work with no problem in Milestone 1. The erroneous behavior is very consistent, it never works in the latest versions. Somewhere between milestone 1 and the october 10 dev release it got broken. Please see the attached screens for an example.
nsegura3 are you able to work around the issue as mentioned in the issue? Are you able to place a newline after the @page line and then get things working or not? If you are then it seems like a regression and a keyword REGRESSION should be added. To, it would seem that would be a P2 if that is the case as a workaround exists, but it really isn't practical as one would have to first find this bug to know about the workaround...not obvious. If you can find no workaround then it is a P1 as the feature does not exist. Please change the priority based on these two things. See: http://wiki.netbeans.org/BugPriorityGuidelines if you ever need to know how to set a priority.
I verified this on NB 6.5 Beta, and it did work back then. So, somewhere between Beta and RC 1 it got broken. I tried the workaround, and it makes no difference (actually I dont have a page in which to page statements are in the same line). I am using JBoss 4.2.2.GA. Since the workaround does not work, and the feature used to work in early builds of 6.5, I will upgrade this to a P1.
Sounds very annoying. Martine E, can I please ask you to look at this to see what could have caused this regression? I don't think there was any change in the JSP debugging code. Thanks.
I've reproduced this on the provided example. Tooltip and Watches show null values. Local Variables work fine and show correct values. I'm going to explore what's wrong...
This seems to be caused by using JavaSourceUtil.Handle to obtain the CompilationController - issue #147032. That handle can work only upon FileObjects. But the sources of JSP are compiled into paths like "<User-dir>/var/virtual1225276762192" and we can not obtain any FileObjects for paths like this. Therefore we can not proceed with the parsing of tooltip and watches expressions.
I've fixed it in trunk in changeset: 106890:b61763d018b9 http://hg.netbeans.org/main/rev/b61763d018b9 Can someone from QE please verify the fix? I'd like to integrate it into release65, IMHO it's a showstopper for JSP debugger.
*** Issue 151329 has been marked as a duplicate of this issue. ***
Verified in trunk build by QE.
Integrated into 'main-golden', will be available in build *200810300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b61763d018b9 User: mentlicher@netbeans.org Log: #76385 - Fix of regression caused by the fix of issue #147032. The parsing of expressions must work even when we can not access the source file.
Review of the fix done. I think it is correct.
I checked the latest build (200810300201), and the fix does work. I can see the tool tips with the actual variable values when debugging JSP. Watches work too. Thanks!
Thanks for the review and verification, the fix is transplanted into release65 repository: changeset: 105994:7c4a51894ecd http://hg.netbeans.org/release65/rev/7c4a51894ecd