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.
Summary: | Unable to toggle line breakpoint in JS file | ||
---|---|---|---|
Product: | javascript | Reporter: | Vladimir Riha <vriha> |
Component: | Debugger | Assignee: | Martin Entlicher <mentlicher> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | akochnev, AnnM, dkonecny, markiewb, pjiricka, swpalmer |
Priority: | P2 | Keywords: | RANDOM |
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
IDE log
webkit log IDE log #2 Failue to toggle png screenshot |
Description
Vladimir Riha
2013-12-17 09:02:28 UTC
Created attachment 143234 [details]
IDE log
IDE log after unsuccessful line breakpoint creation
Created attachment 143235 [details]
webkit log
webkit log
It seems it is not about creating only, but also about removing. I just saw that the existing breakpoint cannot be toggled off. However creating/removing breakpoints from Breakpoints window works. One thing I noticed (not sure if related) if I invoke New Breakpoint dialog from Breakpoints while focus is in JS file, then file field in the dialog is not prefilled with path to the current file Should be fixed by changeset: 269542:80ef2da79430 http://hg.netbeans.org/core-main/rev/80ef2da79430 Thank you, I've been trying to reproduce it today for some quite some time but haven't find a way. Integrated into 'main-silver', will be available in build *201312190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/80ef2da79430 User: mentlicher@netbeans.org Log: #239549: Breakpoint annotation and submission repair. I'm sorry I've just seen it with PHP project. I couldn't toggle line breakpoint in JS file but I could in embedded JavaScript in HTML file. The project was not running. Product Version: NetBeans IDE Dev (Build 201401080002) Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b65 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b122 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb) Created attachment 143758 [details]
IDE log #2
If it helps, I can provide thread dump and profiler snapshot *** Bug 240706 has been marked as a duplicate of this bug. *** Although I don't think that in my previous cases I've made any file manipulation, but following steps do reproduce the same behavior (but cause could be different): - create a HTML5 sample responsive rabbits - run it in Chrome with NB integration - open js/loadWelcome.js and toggle line breakpoint on line 9 (went OK) - in IDE, rename loadWelcome.js to loadWelcome2.js - open index.html and update line 12 to <script type="text/javascript" src="js/loadWelcome2.js"></script> - save the file (triggers reload in browser) - debugger stops on line 9, now try to toggle line breakpoint on line 19 => does not work, acts as if I did 2 quick clicks (one to toggle on, 2nd to toggle off line breakpoint). The only way to add line breakpoint is to use New Breakpoint dialog. Product Version: NetBeans IDE Dev (Build 201401200001) Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b65 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b122 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb) I have also seen this on Windows with a HTML 5 project and Chrome integration. I was using the NB 8.0 FCS build 201403052200. It happens very frequently for me. First removing a breakpoint via clicking in the gutter becomes impossible (though it appears that it can be shifted to adjacent lines or something). Then once I remove it via the Breakpoints window I find clicking in the gutter will not make a new breakpoint. I tried to debug this. I am still not sure how to reproduce the bug every time but I identified the problem. It happens when org.netbeans.modules.web.javascript.debugger.breakpoints.BreakpointActionProvider (which should only handle javascript embeded in HTML files) try to activate the breakpoint. It then conflicts with org.netbeans.modules.javascript2.debug.breakpoints.ToggleBreakpointActionProvider (which rightfully handle JS files) which also try to add the breakpoint. Since the breakpoint is already present then, it is considered a removal. I haven't yet found why BreakpointActionProvider.doAction is called on JS files too. Thank you avandecreme for evaluating. Martin, could you please look at it for patch? Thank you Thanks for your analysis. Looking into it... I think I have a fix but I am not sure whether it might break something else or not. In org.netbeans.modules.web.javascript.debugger.MiscEditorUtil.getCurrentLine, the following test: if (!MiscEditorUtil.isJavascriptSource(fo) && !MiscEditorUtil.isHTMLSource(fo)) should now be: if (!MiscEditorUtil.isHTMLSource(fo)) This is because the Javascript files are now handled by ToggleBreakpointActionProvider which is using its own JSUtils.getCurrentLine method. Also, for those needing a workaround: do not open any html file within netbeans. Hopefully, those don't change much often :) Thanks, it's fixed by changeset: 273687:626c89e252e0 http://hg.netbeans.org/core-main/rev/626c89e252e0 *** Bug 243420 has been marked as a duplicate of this bug. *** Increasing the priority to P2 - it's a duplicate of a P2 issue and it's an annoying regression. Integrated into 'main-silver', will be available in build *201404130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/626c89e252e0 User: mentlicher@netbeans.org Log: #239549: Assure that BreakpointActionProvider is enabled on HTML files only. Thank you, case from comment #11 is no longer reproducible but I cannot 100% verify if the problem is really gone as I don't know how to reproduce it (the problem was happening without any file manipulation). Product Version: NetBeans IDE Dev (Build 201404160001) Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb) Transplanted into release80 as changeset: 282891:44c611b58ded http://hg.netbeans.org/releases/rev/44c611b58ded http://hg.netbeans.org/releases/rev/e18d1bfc9514 *** Bug 243952 has been marked as a duplicate of this bug. *** Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/44c611b58ded User: mentlicher@netbeans.org Log: #239549: Assure that BreakpointActionProvider is enabled on HTML files only. (transplanted from 626c89e252e0c17ed65bd6a3f91d1c458bd85baa) Works fine for me in: Product Version: NetBeans IDE 8.0 (Build 201403101706) Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1 Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/8.0 Cache directory: /home/cesilko/.cache/netbeans/8.0 Works for me as well, comment #11 no longer reproducible Product Version: NetBeans IDE 8.0 (Build 201403101706) Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1 Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb) Created attachment 146960 [details]
Failue to toggle png
This is called directly from a button click.
Created attachment 147372 [details]
screenshot
I do not think this issue is fully resolved. Unfortunately I do not know how to reproduce it but frequently (I would say each second day) I bump into a problem (after few hours of work) as illustrated in the screenshot: the IDE editor shows breakpoints which do not exist anymore. And as you can see I've just added a new breakpoint to line 109 and editor indicates that there are two breakpoints.
To reproduce it I would explore scenario like this: set a breakpoint; do a debugging and hit it; continue debugging; restart IDE; debug it again; hit the breakpoint; try adding different breakpoint; etc.; remove all breakpoints via Breakpoints view; etc. At some point some breakpoints are not removed and I had to restard the IDE.
I can also testify that this problem is not fixed with the latest Netbean version 8.0.1. The problem occurs in my javascript projects in Netbean. I cannot turn breakpoints off. When I click on a breakpoint to turn it off instead of going away its icon changes from a single red square to a double red square. I am not sure what the double red square suppose to mean. (In reply to runiter from comment #30) > I can also testify that this problem is not fixed with the latest Netbean > version 8.0.1. The problem occurs in my javascript projects in Netbean. I > cannot turn breakpoints off. When I click on a breakpoint to turn it off > instead of going away its icon changes from a single red square to a double > red square. I am not sure what the double red square suppose to mean. @runiter@netbeans.org: Please create a new issue instead of reopening old issues. |