| Summary: | Resource based ScriptLoad Breakpoints do not work | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Simon Kaegi <simon_kaegi> | ||||||||
| Component: | Debug | Assignee: | Simon Kaegi <simon_kaegi> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Simon Kaegi <simon_kaegi> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | david_williams, neil.hauge, thatnitind | ||||||||
| Version: | 3.2 | Flags: | david_williams:
pmc_approved+
thatnitind: pmc_approved? (raghunathan.srinivasan) thatnitind: pmc_approved? (naci.dai) thatnitind: pmc_approved? (deboer) neil.hauge: pmc_approved+ thatnitind: pmc_approved? (kaloyan) thatnitind: review+ |
||||||||
| Target Milestone: | 3.2 RC3 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | PMC_approved | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Simon Kaegi
Created attachment 169383 [details]
proposed patch
This patch makes the resources script path a relative uri and allows proper matching.
This patch is not sufficient. I seem to be breaking globally on every script now and need to investigate further. Created attachment 169707 [details]
proposed patch
Script loads were incorrectly breaking on any scriptload breakpoint because we were not calling "JavaScriptBreakPoint.scriptPathMatches" and so by default were matching every script.
This patch has code to do both the relativization of the script path loaded from the ui as well as ensuring we do a script path match when the global script load breakpoint is not set.
Created attachment 169715 [details]
proposed patch
This patch is a slightly more conservative version of the previous patch and will only set the global scriptload breakpoint's "script path" label when checking the global scriptload breakpoint.
This bug should be considered for RC3 since at the moment scriptload breakpoints are broken and this is a fundamentalc feature of a JavaScript debugger. Currently when any scriptload breakpoints are set the global script load breakpoint will be triggered on any script load. There unfortunately is no workaround and "functionally" this limits the usefulness of script load breakpoints particularly for large projects that load many scripts. In addition the UI provides the feature but it does not currently work correctly and provides no feedback to indicate otherwise. The patch provides two fixes: 1) It corrects the creation of an absolute URI as a script path that should be "relative" URIs when creating scriptload breakpoints for workspace resources 2) It provides one spot where the logic to determine when a scriptload breakpoint is the global scriptload breakpoint or if the script path of the breakpoint matches the script being loaded. This patch has been tested as part of a manual test suite. We are working on a core debug test suite similar to JDT debug to do more of this testing automatically however it is not ready. This is a non-api change and localized to the non-global scriptload breakpoint code path. If there is a problem it will be localized to workspace based scriptload breakpoints which at the moment are broken. Seems like a fairly serious loss of functionality. Appears there is some risk here, but given Nitin's review and approval, I approve. Fixed in HEAD. Patch released for RC3 |