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 220839 - Disabled DOM breakpoints does not track dynamic changes in DOM made by JavaScript
Summary: Disabled DOM breakpoints does not track dynamic changes in DOM made by JavaSc...
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 12:37 UTC by Vladimir Riha
Modified: 2012-10-29 01:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-10-25 12:37:29 UTC
If you have HTML like this:
...
  <script>
            var operator = new DOMMaster();
            function DOMMaster() {
                this.removeMe = function(el) { // public
                    $(el).remove();
                };
            }
        </script>
    </head>
    <body>
        <ul>
            <li style="cursor: pointer" onclick="operator.removeMe(this);">Remove me 0</li>
            <li style="cursor: pointer" onclick="operator.removeMe(this);">Remove me 1</li>
            <li style="cursor: pointer" onclick="operator.removeMe(this);">Remove me 2</li>
        </ul>
    </body>
...

- run the file in Chrome
- add DOM breakpoints for Node Removal for the 1st and 2nd <li> element
- click on the first <li>, code execution stops at jquery code (ok), press Continue F5
- now disable breakpoint for the 2nd <li>
- click on 2nd <li>
=> code execution stops again (WRONG) at breakpoint because the 2nd <li> became li[0] and DOM breakpoint for li[0] is still valid/enabled

It seems that the problem is only with disabling. I tried to add breakpoint to only li[0] and:
- clicked on 1st <li> => code execution stops, OK
- then clicked on 2nd <li> => code execution was not stopped, so OK 



Product Version: NetBeans IDE Dev (Build 201210250001)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04
System: Linux version 3.2.0-31-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2012-10-25 12:40:39 UTC
screencast

https://docs.google.com/open?id=0B6Sd5ov8j7IUUEZya295NFA5amc