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.
Product Version: NetBeans IDE 6.7.1 RC (Build 200907150227) Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02 Step into sometimes fails to detect the nearest available source file and stop in it. In the scenario described below, when stepping into out.println("<head>"), source of println() is not available, since 'out' is an instance of com.sun.enterprise.web.connector.coyote.PECoyoteResponse$PECoyoteWriter. The nearest available source is java.nio.CharBuffer which of wrap() method is reached by nested calls. 1. run sample "ServletExamples" 2. place breakpoints on lines 41,45,49 in HelloWorldExample.java 3. try to step into - I succeeded to step into on line 49 only Class where breakpoints were set extends HttpServlet here X marks lines where breakpoint is set and I tried to step into. Y denotes place where I suceeded to step into. scenario: public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ResourceBundle rb = ResourceBundle.getBundle("LocalStrings",request.getLocale()); X response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); X out.println("<head>"); String title = rb.getString("helloworld.title"); Y out.println("<title>" + title + "</title>");
reproducible
Hmm, reproduced. There is sure something wrong. If I refresh the page (during one debugging session) debugger still fails to step into 'response.setContentType("text/html");' - the first X, but now it steps into 'out.println("<head>");' - the second X. I would like this fixed in 6.8, so I'm making it P2.
Well, as I analyzed the behavior it seems to me O.K. The code in C2BConverter is quite complicated, therefore it's realistic that CharBuffer.wrap() is not called always. IMHO debugger works correctly in the sense that it steps through code that does not have source available and stops when it reaches code with source available. But during testing this I've found another bug - when you succeed to step into and you do Step Over then, the program just resumes and stops on the next breakpoint. This is a bug.
Step Over fixed in changeset: 153319:8f7ff729854f http://hg.netbeans.org/main/rev/8f7ff729854f