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.
[ BUILD # : RC1 ] [ JDK VERSION : J2SE 1.5.0 ] I have external tomcat 4.1.31 runnin in debug mode I attach remotely via socket to the tomcat and debug my servlets. This bug is reproducible with empty user dir always. Open a servlet and set the breakpoint in the source. Invoke that servlet. The breakpoint will activate and you can step over through the lines. No press Ctrl+F5 (continue). Add one line below the line where the breakpoint is set. int k=0; Wait until tomcat reload the context. Now invoke the servlet again. The breakpoint will activate again but during doing step over the cursor is hitting wrong lines even empty ones. Doing detach/attach helps but it's not convenient.
Can web guys evaluate it, please?
I have external Tomcat 5.0.28 and IDE build 041208, JDK 1.5.0. I went through following steps: 1. I started Tomcat in debug mode, 2. deployed web application on it (from IDE!), 3. attached debugger to it 4. added bp into a servlet, 5. load servlet in browser - it caused bp hit, 6. changed method where bp was set, 7. builded project (F11), 8. finished current http session (behaved in old/unchanged way), 9. repeated step 5, 10. next behavior depended upon context.xml settings: a. <context path="/..." reloadable="true">...</context> caused correct reloading of changed class b. <context path="/...">...</context> caused no change in comparison to original source - container simply did not reload changed class file (which is also correct) Well, is there classes/libs reloading correctly set? If changed class was not reloaded, VM might not return correct values into debugger. Could you please verify your settings?
Well actually I have context reloadable. As I said "Wait until tomcat reload the context." The workaround of the issue is to just finish debugging and reattach agian. after that breakpoints work correctly. So I do the following. When I want to debug I attach remotely. If during debugging I change some file I wait until tomcat reloads the context. Then I press Shift+F5 (Stop debugging) and again attach to tomcat. BTW that worked ok in 3.6
Do you have same problems with Tomcat 5.0.28 (bundled in IDE) when you add reloadable?
Actually I can not evaluate this situation, because I have two web apps. One is the base app that serves as a login application (to achieve single sign on) and the second one is the application I have encountered the problems with. I've found out that it's impossible to run two web apps in debug mode from the IDE using bundled tomcat. Anyway how it's related to my issue? Is my configuration (External tomcat 4.1.31) supported on NetBeans 4.0?
Tomcat 4.x is not supported by NB4.0. I'd like to determine if it is Tomcat or NetBeans problem, because it seems that it works with Tomcat 5.x. Could you please create a new simple WebApp and test your scenario on Bundled Tomcat 5.x? I don't think it is necessary to test it on 'real' applications.
I could reporduce it with bundled tomcat 5.0.28. I did the following 1. Created a simple web app. index.jsp is created automatically with the new web application project. 2. Added the following line in index.jsp after <body> tag <a href="debug">Click</a> 3. Created a servlet with the mapping "/debug" 4. Edited META-INF/context.xml and added reloadable="true" to the context. 5. Started tomcat in debug mode (F5) 6. Set breakpoint in Debug servlet 7. in the browser click on the link 8. The breakpoint is activated. 9. cursor follows source code lines correctly. 10. now changed source code. Add lines, remove lines change the structure. Compile the servlet with F9. 11. after some time start from the step 7 on the step 9 cursor does not follow source code lines correctly.
This is a cross-module problem that includes jpda, debuggercore, webproject and jsp debugger. For this release I suggest a workaround: Simply invoke the "Fix" debugger action after you redeploy the servlet.
*** Issue 56546 has been marked as a duplicate of this issue. ***
not fixable in 55. decreasing to P4, there are more important issues in the debugger area.
moving opened issues from TM <= 6.1 to TM=Dev
I was able to reproduce this on Tomcat 6 using the steps vanob provided for Tomcat 5.0.28. How might we attempt a fix? Can someone familiar with the underlying mechanism(s) explain? Marking incomplete.
Without requested information for long time - INVALID. We can't do anything in this case. Reporter, please add requested information and reopen issue. Thanks in advance.