During 0.3a5 development there was a lot of work done to make the protocol more consistent and coherent, as expected, this work brought with it many changes to the protocol and a few changes that are no longer compatible with existing versions of Crossfire.

+

−

+

−

This guide will help ease the transition from using a pre-0.3a5 version of Crossfire, with each affected protocol entity described in its own following section.

# You can optionally specify a "context_id" argument that will return only the collection of breakpoint ids that apply to that context

+

−

# The "context_id" attribute has been removed from the response

+

−

+

−

== setbreakpoint ==

+

−

The <code>setbreakpoint</code> [[Crossfire_Protocol_Reference#setbreakpoint|request]] has been updated to accept new arguments; <code>enabled</code> and <code>condition</code>, and too make use of the new breakpoint <code>location</code> object.

The following changes require clients to discontinue using the two removed arguments; <code>target</code> and <code>line</code>, and to begin using the new <code>location</code> object. Clients can also optionally use the <code>enabled</code> and <code>condition</code> arguments.

The following changes require clients to discontinue using two removed attributes; <code>href</code> and <code>context_href</code> and begin using the new <code>script</code> object.

+

−

:

+

−

'''Details'''

+

−

:

+

−

In the pre-0.3a5 versions of Crossfire the <code>onScript</code> event had the following form:

+

−

:

+

−

<source lang="javascript">

+

−

Content-Length:192

+

−

\r\n\r\n

+

−

{

+

−

"type":"event",

+

−

"event":"onScript",

+

−

"context_id":"xf0.3::8127620",

+

−

"body":{

+

−

"context_href":"http://www.google.ca/advanced_search?hl=en/4",

+

−

"href":"http://www.google.ca/advanced_search?hl=en"

+

−

}

+

−

}

+

−

</source>

+

−

:

+

−

The following has changed:

+

−

* the <code>body</code> object no longer contains an <code>href</code> or <code>context_href</code> entry

+

−

* the <code>body</code> object now contains the <code>script</code> meta-data object, identical to what is returned via a [[Crossfire_Protocol_Reference#script|script]] request with no included source.

+

−

:

+

−

New event form:

+

−

:

+

−

<source lang="javascript">

+

−

Content-Length:631

+

−

\r\n\r\n

+

−

{

+

−

"seq":10,

+

−

"type":"event",

+

−

"event":"onScript",

+

−

"context_id":"xf0.3::2531266",

+

−

"data":{

+

−

"script": {

+

−

"id":"http://www.google.ca/advanced_search?hl=en",

+

−

"lineOffset":0,

+

−

"columnOffset":0,

+

−

"sourceStart":"(function()\u000a",

+

−

"sourceLength":311,

+

−

"lineCount":311,

+

−

"compilationType":"top-level"

+

−

}

+

−

}

+

−

}

+

−

</source>

+

−

:

+

−

The values and kinds of the <code>script</code> object are as follows:

+

−

:

+

−

{| border="1" cellpadding="5" cellspacing="0"

+

−

|-

+

−

| <code>id</code> || a String identifier for the script - never null

+

−

|-

+

−

| <code>lineOffset</code> || a Number representing the line offset of the script - never less than 0

+

−

|-

+

−

| <code>columnOffset</code> || a Number representing the column offset of the script - never less than 0

+

−

|-

+

−

| <code>sourceStart</code> || a String representing the first line of source in the script - never null

+

−

|-

+

−

| <code>sourceLength</code> || a Number representing the entire length of the source of the script - never less than 0

+

−

|-

+

−

| <code>lineCount</code> || a Number representing the total number of lines of source in the script - never less than 0

+

−

|-

+

−

| <code>compilationType</code> || a String describing the kind of the script - see [http://code.google.com/p/fbug/source/browse/branches/firebug1.7/content/firebug/sourceFile.js sourceFile.js] for complete listing of types

+

−

|}

+

−

+

−

== onToggleBreakpoint ==

+

−

The <code>onToggleBreakpoint</code> [[Crossfire_Protocol_Reference#onToggleBreakpoint|event]] has been updated to reflect the new location object for breakpoints and to return a more complete set of breakpoint information.