Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339462

Summary: [Crossfire] cannot set bp on CFScriptReference created from onScript event
Product: [WebTools] JSDT Reporter: Grant Gayed <grant_gayed>
Component: DebugAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED FIXED QA Contact: Michael Rennie <Michael_Rennie>
Severity: normal    
Priority: P3 CC: thatnitind
Version: unspecified   
Target Milestone: 3.3 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch none

Description Grant Gayed CLA 2011-03-10 00:05:12 EST
- connect to a Crossfire server
- show JS scripts in the debugger
- navigate to a page, open one of its scripts, set a breakpoint on it, works fine
- now refresh the browser, which rebuilds the tree of scripts based on received onScript events
- the previously-set breakpoint can be cleared, but attempting to set a new breakpoint will not send a setbreakpoint request to the server

The problem is that when CFScriptReference is initialized from an onScript event, rather than from CFVirtualMachine.allScripts(), the json Map it's given does not contain very much because onScript events are not spec'd to return line counts, etc.  As a result the CFScriptReference's linelocs are not properly initialized.
Comment 1 Grant Gayed CLA 2011-03-10 00:30:19 EST
Created attachment 190819 [details]
patch
Comment 2 Michael Rennie CLA 2011-03-10 09:50:05 EST
Changes in the crossfire protocol have all but mitigated this problem, although I can see the value in the patch: in case you are running on a version of crossfire that does not have the new packet shape OR crossfire failed to get script meta-data, we should try sending a 'script' request for the infos.

The related crossfire bug is:

http://code.google.com/p/fbug/issues/detail?id=3476
Comment 3 Grant Gayed CLA 2011-03-10 11:18:04 EST
I've changed the IE server to send the more detailed onScript events, so this now works with the latest JSDT.