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 254093 - Breakpoints in JavaScript are ignored during testing
Summary: Breakpoints in JavaScript are ignored during testing
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-02 23:18 UTC by skomisa
Modified: 2015-08-13 12:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans log file (126.98 KB, application/octet-stream)
2015-08-02 23:18 UTC, skomisa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skomisa 2015-08-02 23:18:07 UTC
Created attachment 155134 [details]
NetBeans log file

Summary:
When a trivial web project code is run in debug mode Java breakpoints are honored but JavaScript breakpoints are ignored.

Steps to reproduce the problem:
1. Use the NetBeans wizard to create a web application that uses Tomcat and has a JSF.
2. Create a trivial JavaScript file named NewJavaScript.js that simply calls alert() twice:

    alert('This is alert 1');
    alert('This is alert 2');

3. Modify the generated JSF file named index.html to to include that file:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <script src="newjavascript.js"></script>
        Hello from Facelets (TomCatWebApp2)
    </h:body>
</html>

4. Set breakpoints on the two alert() calls. The lines turn red.
5. Create a servlet:
  - Create package 'test'
  - In that package create a servlet named NewServlet.java by right-clicking on the package node, select New/Servlet..., accept the default options, and click the Finish button.
6. Set a breakpoint on the 'try' (line 38) of the generated Java source.
7. Select node NewServlet.java, right-click and select 'Debug file'. Processing correctly pauses on the breakpoint line which is now green. Press F5 to complete.
8. Now select the project node, right-click and select Debug. The message from the first alert is incorrectly display in the browser, since the breakpoint on that line of JavaScript is ignored.

The NetBeans log file is attached.

Environment details from Help/About in NetBeans:

Product Version: NetBeans IDE 8.1 Beta (Build 201507282201)
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\JohnDoe\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\JohnDoe\AppData\Local\NetBeans\Cache\8.1beta
Comment 1 Jiri Kovalsky 2015-08-13 12:37:56 UTC
This is not a problem of Synergy. Reassigning accordingly.