Crossfire 0.3a7 Protocol Reference
From FirebugWiki
m (Created page with "== Handshake == Once a connection has been established with a remote host, Crossfire will wait until it receives a UTF-8 string which matches <code>CrossfireHandshake\r\n\r\n</c...") |
m (→deletebreakpoint) |
||
| (One intermediate revision not shown) | |||
| Line 714: | Line 714: | ||
"seq":<packet_sequence>, | "seq":<packet_sequence>, | ||
"request_seq":<request_sequence>, | "request_seq":<request_sequence>, | ||
| - | "body":{}, | + | "body":{<breakpoint_object>}, |
"running":<is_running>, | "running":<is_running>, | ||
"success":<success_status>, | "success":<success_status>, | ||
| Line 729: | Line 729: | ||
|- | |- | ||
| <code>request_sequence</code> || the request sequence number | | <code>request_sequence</code> || the request sequence number | ||
| + | |- | ||
| + | | <code>breakpoint_object</code> || the [[#breakpoint|breakpoint object]] that was changed | ||
|- | |- | ||
| <code>running</code> || if Crossfire is in a running state | | <code>running</code> || if Crossfire is in a running state | ||
| Line 747: | Line 749: | ||
"seq":26, | "seq":26, | ||
"request_seq":23, | "request_seq":23, | ||
| - | "body":{}, | + | "body":{ |
| + | "handle":4, | ||
| + | "type":"line", | ||
| + | "location":{ | ||
| + | "url":"http://www.google.ca/", | ||
| + | "line":2 | ||
| + | }, | ||
| + | "attributes":{ | ||
| + | "enabled":true, | ||
| + | "condition":null | ||
| + | } | ||
| + | }, | ||
"running":true, | "running":true, | ||
"success":true | "success":true | ||
| Line 956: | Line 969: | ||
"seq":<packet_sequence>, | "seq":<packet_sequence>, | ||
"request_seq":<request_sequence>, | "request_seq":<request_sequence>, | ||
| - | "body":{}, | + | "body":{<breakpoint_object>}, |
"running":<is_running>, | "running":<is_running>, | ||
"success":<success_status>, | "success":<success_status>, | ||
| Line 971: | Line 984: | ||
|- | |- | ||
| <code>request_sequence</code> || the request sequence number | | <code>request_sequence</code> || the request sequence number | ||
| + | |- | ||
| + | | <code>breakpoint_object</code> || the [[#breakpoint|breakpoint object]] that was deleted | ||
|- | |- | ||
| <code>running</code> || if Crossfire is in a running state | | <code>running</code> || if Crossfire is in a running state | ||
| Line 989: | Line 1,004: | ||
"seq":15, | "seq":15, | ||
"request_seq":13, | "request_seq":13, | ||
| - | "body":{}, | + | "body":{ |
| + | "handle":4, | ||
| + | "type":"line", | ||
| + | "location":{ | ||
| + | "url":"http://www.google.ca/", | ||
| + | "line":2 | ||
| + | }, | ||
| + | "attributes":{ | ||
| + | "enabled":true, | ||
| + | "condition":null | ||
| + | } | ||
| + | }, | ||
"running":true, | "running":true, | ||
"success":true | "success":true | ||
Latest revision as of 19:43, 11 July 2011
[edit] Handshake
Once a connection has been established with a remote host, Crossfire will wait until it receives a UTF-8 string which matches CrossfireHandshake\r\n\r\n
If crossfire was started as a server it will reply with an acknowledgement that matches CrossfireHandshake\r\n\r\n.
The handshake can also be modified to include the names of tools that should be enabled when the server starts. More information about tool support and how to enabled / disable them can be found on the Tools API page.
[edit] Packet Format
Crossfire packets contain a content-length header with key
Content-Length followed by a colon (:),
and the number of characters (in decimal) contained in the message body.
The body of the packet is a UTF-8 string containing a JSON-formatted message. Message bodies contain, at a minimum, the context ID, sequence number and packet type.
- contextId
- string that identifies which JavaScript context the packet applies to.
- seq
- the packet sequence number (integer)
- type
- the type of the packet - one of
"request","response", or"event"
Packet headers and body are separated by a double CRLF (\r\n\r\n).
Packets are terminated by a CRLF (\r\n) after the body.
Example:
Content-Length:69 \r\n\r\n { "contextId":null, "type":"request", "seq":1, "command":"listcontexts" }\r\n
[edit] Request Packets
A request packet includes a command name and an arguments object containing any arguments specific to the command.All request packets have the general form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":<command>, "contextId":<context_id> "seq":<packet_sequence>, "arguments":{<argument_list>} }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) commandthe name of the request. A complete listing of requests that can be used in <command>are available in the Commands section.context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number arguments_listthe list of arguments to pass in with the request
Example:
Content-Length:219 \r\n\r\n { "type":"request", "command":"setbreakpoint", "contextId":"http://localhost:8080/test.html", "seq":21, "arguments": { "position":0, "enabled":true, "target":"http://localhost:8080/test/some_javascript.js", "line":9, "ignoreCount":0, "type":"line" } } \r\n
[edit] Response Packets
A response packet will contain the sequence number of the original request and the name of the command, as well as the body of the response and booleans indicating the running status and whether the request was successful.All response packets are of the form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":<command>, "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":<body_object>, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) commandthe name of the original request context_idthe id of the context this response came from packet_sequencethe packet sequence number request_sequencethe request sequence number body_objectJSON object containing additional data about the response runningif Crossfire is in a running state successif the request was successful or not
Example:
Content-Length:80 \r\n\r\n { "type":"response", "command":"listcontexts", "contextId":"xf0.1a::9931113", "seq":2, "request_seq":1, "running":true, "success":true, "body":{ "contexts":["http://localhost:8080/test.html"] } } \r\n
[edit] Event Packets
Event packets contain the name of the event and a 'data' object which may contain more information related to the event.All event packets are of the form:
Content-Length:<content_length> \r\n\r\n { "type":"event", "event":<event>, "contextId":<context_id>, "seq":<packet_sequence>, "data":{<data_object>} }Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) eventthe name of the event. A complete listing of events that can appear in <event>are available in the Events section.context_idthe id of the context this event came from packet_sequencethe packet sequence number data_objectJSON object containing additional data about the event
Example
Content-Length:122 \r\n\r\n { "type":"event", "event":"onContextCreated", "contextId":"xf0.1a::9931113", "seq":5, "data":{ "href":"http://www.google.ca/" } }
[edit] Types
Commands like frame, backtrace, scope, lookup will contain serialized Javascript values and objects in the body of the response. The JSON structure for these objects will always contain a type field, and either a value field with a JSON value or, in the case of object or function types, a handle field which can be used to obtain the actual value by using the lookup command.
[edit] object
Anobjectis represented as a handle of the form:
{ "myobject":{ "type":"object", "handle":<number> } }
Objects can also be nested within other objects. For example in the case of
backtracerequest, you will receive a response with variables split up as locals and 'this'.
Nested objects will always appear as a
valueentry in the object, like the following:
{ "myobject":{ "type":"object", "value":{ "mynestedobj":{"type":"object","handle":<number>} } } }
[edit] function
Afunctionis represented as a handle of the form:
{ "myfunction":{ "type":"function", "handle":<number> } }In versions of Crossfire less than 0.3a2 a function was represented as:
{ "myfunction":{ "type":"function", "value":"function()" } }
[edit] boolean
Abooleanis represented as:
{ "myboolean":{ "type":"boolean", "value":<true_or_false> } }
[edit] number
Anumberis represented as:
p { "mynumber":{ "type":"number", "value":<number> } }
[edit] string
Astringis represented as:
{ "mystring":{ "type":"string", "value":"string_value" } }
[edit] undefined
Anundefinedvalue is represented as:
{ "myfunction":"undefined" }
[edit] null
Anullvalue is represented as:
{ "mystring":null }
[edit] Objects
[edit] breakpoint
A breakpoint object describes a single breakpoint from Crossfire.This object can be found in the changebreakpoint, getbreakpoint, getbreakpoints and setbreakpoint responses as well as the onToggleBreakpoint event.
{ "handle":<handle>, "type":<type>, "location":<location>, "attributes":<attributes> }Values
handlethe Crossfire identifier for this breakpoint object typethe type of the breakpoint - for example lineorerrorlocationthe object that contains location information attributesthe object of attributes that describe the breakpoint - for example enabledorcondition
[edit] context
A context object describes a given context (tab) in Crossfire.This object can be found in the listcontexts response.
{ "contextId":<context_id>, "url":<url>, "current":<is_current> }
Values
context_idthe id of the context urlthe URL opened in the context (tab) is_currentif the context is the focus context
[edit] frame
A frame object describes a single stackframe from the debugger.This object can be found in the backtrace and frame responses.
{ "index":<index>, "line":<line_number>, "functionName":<func_name>, "url":<url>, "locals":<variable_objects>, "scopes":<scope_array> }Values
indexthe index of the frame within the complete stack of frames from the debugger line_numberthe line number the frame is currently suspended on functionNamethe name of the function the frame is currently suspended in urlthe URL of the script the frame is suspended in localsthe object containing the group of local variables for the frame scopesthe array of scope objects
[edit] scope
A scope object represents a logical grouping for a given set of local variables.This object can be found in a stack frame object and in the scope and scopes responses.
{ "index": <index>, "frameIndex": <frame_index>, "scope": <scope_object> }
Values
indexthe index of the scope in the complete array of scopes frame_indexthe index of the frame this scope aligns with closing_objectthe serialized object handle of the object that makes up this scope
[edit] script
A script object describes a single script.This object can be found in the script, scripts and source responses as well as in the onScript event.
{ "url":<url>, "lineOffset":<line_offset>, "columnOffset":<column_offset>, "sourceLength":<source_length>, "lineCount":<line_count>, "type":<type>, "source":<source> }Values
urlthe URL of the script line_offsetthe current line offset of the script within its parent (if any) column_offsetthe current column offset of the script within its parent (if any) source_lengththe entire length of the source for the script including all control characters line_countthe number of lines in the script typethe type of the compilation unit - see sourceFile.js for complete listing of types sourcethe complete source of the script
[edit] tool
A tool object describes a default or contributed tool.This object can be found in the gettools, enabletools and disabletools responses.
{ "name":<name>, "enabled":<enabled_state>, "commands":<command_array>, "events":<event_array>, "desc":<description> }Values
namethe name of the tool enabled_statethe enabled state of the tool (true or false) command_arraythe array of the names of the commands this tool supports event_arraythe array of the names of the events this tool is capable of sending descriptionthe human-readable description of the tool
[edit] Commands
[edit] backtrace
Returns a backtrace (stacktrace) of frames.The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"backtrace", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "fromFrame":<from_frame>, "toFrame":<to_frame>, "includeScopes":<include_scopes> } } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number from_framean optional argument that indicates what frame to start the backtrace from. If not specified, zero is assumed. to_framean optional argument that indicates what frame to end the backtrace at. If not specified or larger than the total frame count, the total frame count is assumed. include_scopesan optional argument that indicates that the scopes for the frames should also be returned in the response. If not specified true is assumed.
Example Request
An example of the request you send:
Content-Length:128 \r\n { "type":"request", "command":"backtrace", "contextId":"xf0.1a::9931113", "seq":6, "arguments":{ "fromFrame":0, "includeScopes":true } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"backtrace", "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body": { "fromFrame":<from_frame>, "toFrame":<to_frame>, "frames":<frame_array>, }, "running":<running>, "success":<success> }Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number request_sequencethe packet request sequence number from_framethe number of the frame the backtrace starts from to_framethe number of the frame the backtrace ends at frame_arraythe array of frame objects runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:6325 \r\n\r\n { "type":"response", "command":"backtrace", "contextId":"xf0.3::4303985", "seq":50, "request_seq":49, "body": { "fromFrame":0, "toFrame":1, "frames":[{ "index":0, "func":"onload", "script":"http://www.google.ca//event/seq/1", "locals":{"type":"object", "value":{}}, "line":2, "scopes":[{"index":0,"frameIndex":0,"object":{"type":"object","handle":348}}] }], }, "running":false, "success":true }
[edit] changebreakpoint
Changes the attributes of the breakpoint with the given handle to the given set of attributes.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The form of the request packet is:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"changebreakpoint", "seq":<packet_sequence>, "arguments":{ "handle":<handle> "attributes":<attributes_object> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number handlea required argument that specifies the handle of the breakpoint to change attributes_objectan optional object argument that specifies the attributes to set or update on the breakpoint
Example Request
An example of the request you send:
Content-Length:151 \r\n\r\n { "type":"request", "command":"changebreakpoint", "seq":16, "arguments":{ "handle":1, "attributes":{ "enabled":false, "condition":"typeof(foo) == undefined" } }, } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"changebreakpoint", "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{<breakpoint_object>}, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number request_sequencethe request sequence number breakpoint_objectthe breakpoint object that was changed runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:272 \r\n\r\n { "type":"response", "command":"changebreakpoint", "seq":26, "request_seq":23, "body":{ "handle":4, "type":"line", "location":{ "url":"http://www.google.ca/", "line":2 }, "attributes":{ "enabled":true, "condition":null } }, "running":true, "success":true }
[edit] continue
Continue execution of javascript if suspended, if no stepaction is passed, simply resumes execution.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The form of the packet is:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"continue", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "stepAction":[in, next, out] } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number stepActionan optional argument in crossfire 0.3 and greater, required for 0.2a* and lower. The value can be one of in,next, orout. Passing in an unknown kind ofstepActionwill result in the context being resumed with no step performed.
Example Request
An example of the request you send:
Content-Length:78 \r\n\r\n { "type":"request", "command":"continue", "contextId":"xf0.3::2777681", "seq":87 } \r\n
Example Response
An example of the response you receive:
Content-Length:105 \r\n\r\n { "type":"response", "command":"continue", "seq":8, "request_seq":7, "running":false, "success":true }
[edit] createcontext
Load a new URL into an existing context. If no context is specified, opens a new tab and loads the given URL.This command has been added in Crossfire version 0.3a7, please see the migration guide entry for more information.
The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"createcontext", "seq":<packet_sequence> "arguments": { "url": <url> "contextId":<context_id> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) urlA required URL to load context_idAn optional context id to open the new URL in
Example Request
An example of the request you send:
Content-Length:47 \r\n\r\n { "type":"request" "command":"createcontext", "seq": 22, "arguments": { "contextId":"xf0.1a::9931113", "url": "http://collinsmichaelg.com" } } \r\nExample Response
An example of the response you will receive:
Content-Length:120 \r\n\r\n { "type":"response", "command":"createcontext", "seq":23, "request_seq":22, "body":{}, "running":true, "success":true }
[edit] deletebreakpoint
Remove the breakpoint object with the specified id.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request" "command":"deletebreakpoint", "seq":<packet_sequence>, "arguments":{ "handle":<handle>, } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number handlea required argument that specifies the handle of the breakpoint to clear
Example Request
An example of the request you send:
Content-Length:81 \r\n\r\n { "type":"request", "command":"deletebreakpoint", "seq":13, "arguments":{ "handle":1 } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"deletebreakpoint", "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{<breakpoint_object>}, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number request_sequencethe request sequence number breakpoint_objectthe breakpoint object that was deleted runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:232 \r\n\r\n { "type":"response", "command":"deletebreakpoint", "seq":15, "request_seq":13, "body":{ "handle":4, "type":"line", "location":{ "url":"http://www.google.ca/", "line":2 }, "attributes":{ "enabled":true, "condition":null } }, "running":true, "success":true }
[edit] disabletools
Allows one or more known tools to be disabled.The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"disabletools", "seq":<packet_sequence>, "arguments":{ "tools":<tool_names> } } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number tool_namesa required list argument that provides the names of the tools to be enabled
Example Request
An example of the request you send:
Content-Length:84 \r\n\r\n { "type":"request", "command":"disabletools", "seq":4, "arguments":{ "tools":["console"] } } \r\n
Example Response
An example of the response you receive:
Content-Length:809 \r\n\r\n { "type":"response", "command":"disabletools", "seq":5, "request_seq":4, "body":{ "tools":[ { "name":"console", "enabled":false, "commands":["setloglevel","setloglimit"], "events":["onConsoleLog","onConsoleDebug","onConsoleInfo","onConsoleWarn","onConsoleError"], "desc":"console is a tool with an unimplemented getDescription() method." }, ... ] }, "running":true, "success":true }
[edit] enabletools
Allows one or more known tools to be enabled.The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"enabletools", "seq":<packet_sequence>, "arguments":{ "tools":<tool_names> } } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number tool_namesa required list argument that provides the names of the tools to be enabled
Example Request
An example of the request you send:
Content-Length:84 \r\n\r\n { "type":"request", "command":"enabletools", "seq":4, "arguments":{ "tools":["console"] } } \r\n
Example Response
An example of the response you receive:
Content-Length:809 \r\n\r\n { "type":"response", "command":"enabletools", "seq":5, "request_seq":4, "body":{ "tools":[ { "name":"console", "enabled":true, "commands":["setloglevel","setloglimit"], "events":["onConsoleLog","onConsoleDebug","onConsoleInfo","onConsoleWarn","onConsoleError"], "desc":"console is a tool with an unimplemented getDescription() method." }, ... ] }, "running":true, "success":true }
[edit] evaluate
Evaluates a JavaScript expression, either in the global scope, or optionally in a given frame if it exists.This command has been added in Crossfire version 0.3a7, please see the migration guide entry for more information
The form of the packet is:
Content-Length:<content_length> \r\n\r\n { "command":"evaluate", "type":"request", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "expression":<expression>, "frameIndex":<frame> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number expressiona required argument that specifies the expression to evaluate frameIndexan optional argument that specifies the index of the stackframe to perform the evaluation on, where zero is the top stack frame. If omitted zero is assumed.
Example Request
An example of the request you send:
Content-Length:123 \r\n\r\n { "command":"evaluate", "type":"request", "contextId":"xf0.3::3442767", "seq":20, "arguments":{ "expression":"2*4-1", "frameIndex":0 } } \r\n
Example Response
An example of the response you receive:
Content-Length:177 \r\n\r\n { "command":"evaluate", "type":"response", "contextId":"xf0.3::3442767", "seq":21, "request_seq":20, "running":false, "success":true, "body":{ "result":{ "type":"number", "value":7 } } }
[edit] frame
Returns a frame.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"frame", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "index":<frame>, "includeScopes":<include_scopes> } } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number indexa required argument that specifies the index of the frame to look up include_scopesan optional argument that indicates that the scopes for the frames should also be returned in the response.
Example Request
An example of the request you send:
Content-Length:120 \r\n\r\n { "type":"request", "command":"frame", "contextId":"xf0.3::7322351", "seq":33, "arguments":{ "index":0, "includeScopes":true }, } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"frame", "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body": { <frame_object> }, "running":<running>, "success":<success> }Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number request_sequencethe packet request sequence number frame_objectthe frame object runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:6764 \r\n\r\n { "type":"response", "command":"frame", "contextId":"xf0.3::7322351", "seq":34, "request_seq":33, "body":{ "index":0, "line":19, "func":"anonymous", "script":"http://www.mozilla.com/js/jquery/jquery.min.js", "locals":{"type":"object","value":{},"this":{"type":"object","value":{"classList":{"type":"object","handle":13}}}}, "scopes":[{"index":0,"frameIndex":0,"object":{"type":"object","handle":"14"}}] }, "running":false, "success":true }
[edit] getbreakpoint
Return the breakpoint object with the specified id.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has he following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"getbreakpoint", "seq":<packet_sequence>, "arguments":{ "handle":<breakpoint> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number handlea required argument that specifies the handle of the breakpoint to look up
Example Request
An example of the request you send:
Content-Length:112 \r\n\r\n { "type":"request", "command":"getbreakpoint", "seq":16, "arguments":{ "handle":1 } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"getbreakpoint", "seq":<packet_sequence>, "request_seq":<request_sequence>, "body": { "breakpoint":<breakpoint_object> }, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number request_sequencethe request sequence number breakpoint_objectthe breakpoint object runningif Crossfire is in a running state successif the request was successful or not Example Response
An example of the response you receive:
Content-Length:265 \r\n\r\n { "type":"response", "command":"getbreakpoint", "seq":45, "request_seq":44, "body":{ "breakpoint":{ "handle":1, "type":"line", "location":{ "line":2, "url":"http://www.google.ca//event/seq/1" }, "attributes":{ "enabled":true, "condition":null } } }, "running":true, "success":true }
[edit] getbreakpoints
Return all the breakpoints in this context.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"getbreakpoints", "seq":<packet_sequence>, } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number
Example Request
An example of the request you send:
Content-Length:84 \r\n\r\n { "type":"request", "command":"getbreakpoints", "seq":12, } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"getbreakpoints", "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":<breakpoint_array>, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number request_sequencethe request sequence number breakpoint_arrayarray of breakpoint objects runningif Crossfire is in a running state successif the request was successful or not Example Response
An example of the response you receive:
Content-Length:265 \r\n\r\n { "type":"response", "command":"getbreakpoints", "seq":45, "request_seq":44, "body":{ "breakpoints":[{ "handle":1, "type":"line", "location":{ "line":2, "url":"http://www.google.ca//event/seq/1" }, "attributes":{ "enabled":true, "condition":null } }] }, "running":true, "success":true }
[edit] gettools
Returns the complete collection of registered tools.The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"gettools", "seq":<packet_sequence> } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number
Example Request
An example of the request you send:
Content-Length:48 \r\n\r\n { "type":"request", "command":"gettools", "seq":10 } \r\n
Example Response
An example of the response you receive:
Content-Length:809 \r\n\r\n { "type":"response", "command":"gettools", "seq":5, "request_seq":4, "body":{ "tools":[ { "name":"console", "enabled":true, "commands":["setloglevel","setloglimit"], "events":["onConsoleLog","onConsoleDebug","onConsoleInfo","onConsoleWarn","onConsoleError"], "desc":"console is a tool with an unimplemented getDescription() method." }, ... ] }, "running":true, "success":true }
[edit] inspect
Tells Firebug to enter 'inspect' mode on the given node.The form of the packet is:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"inspect", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "xpath":<xpath> "selector":<selector> } } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number xpathan optional argument specifying the xpath to the node to inspect. selectoran optional argument specifying the selector of the node to inspect
One of
xpathorselectormust be specified. If both are specified,xpathis used.
Example Request
An example of the request you send:
Content-Length:128 \r\n\r\n { "type":"request", "command":"inspect", "contextId":"xf0.3::815372", "seq":51, "arguments":{ "xpath":"/html[1]/body[1]/span[1]" } } \r\n
Example Response
An example of the response you receive:
Content-Length:307 \r\n\r\n { "type":"response", "command":"inspect", "seq":53, "request_seq":51, "body":{ "xpath":"/html[1]/body[1]/span[1]", }, "running":false, "success":true }
[edit] listcontexts
Returns a list of context id's. This command does not require acontextIdfield.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"listcontexts", "seq":<packet_sequence> } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number
Example Request
An example of the request you send:
Content-Length:51 \r\n\r\n { "type":"request", "command":"listcontexts", "seq":8 } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"listcontexts", "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{ "contexts":<contexts_array> }, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number request_sequencethe request sequence number body_objectJSON object containing additional data about the response contexts_arrayarray of context objects runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:196 \r\n\r\n { "type":"response", "command":"listcontexts", "seq":6, "request_seq":5, "body":{ "contexts":[{"contextId":"xf0.3::5482594","url":"http://www.google.ca/","current":true}] }, "running":true, "success":true }
[edit] lookup
Looks up an object by its handle.The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"lookup", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "handle":<handle> "includeSource":<include_source> }, } \r\nArguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number handlea required argument that indicates what object to look up include_sourcean optional argument that indicates you want to return the source for the object (if any). Only available in Crossfire 0.3a2 or greater
Example Request
An example of the request you send:
Content-Length:257 \r\n\r\n { "type":"request", "command":"lookup", "contextId":"xf0.3::8265385", "seq":46, "arguments":{"handle":10,"includeSource":true}, } \r\n
Example Response
An example of the response you receive:
Content-Length:320 \r\n\r\n { "type":"response", "command":"lookup", "contextId":"xf0.3::3775561", "seq":10, "request_seq":9, "body":{ "type":"function", "value":{ "constructor":{"type":"function","handle":88}, "proto":{"type":"object","handle":89} }, "source":"function Object() {[native code]}" }, "running":false, "success":true, }
[edit] scope
Returns a particular scope for the specified frame.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"scope", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "index":<scope_number>, "frameIndex":<frame_number> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number scope_numbera required argument thats indicates which scope to get from the scopes listing. If scope_numberis 0, the global scope is returned. Ifscope_numberis NaN or outside the range of scopes no scope information is returned.frame_numbera required argument thats indicates which frame to get the scope from.
Example Request
An example of the request you send:
Content-Length:113 \r\n\r\n { "type":"request", "command":"scope", "contextId":"xf0.3::6523758", "seq":10, "arguments":{ "index":0, "frameIndex":0 } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"scope", "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body": { "index":<index>, "frameIndex":<frame_index>, "scope": <scope_ref> }, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this response came from packet_sequencethe packet sequence number request_sequencethe request sequence number indexthe index of the scope that was returned frameIndexthe index of the stackframe that the scope was returned from scopethe scope object runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:194 \r\n\r\n { "type":"response", "command":"scope", "contextId":"xf0.3::6523758", "seq":11, "request_seq":10, "body":{ "index":0, "frameIndex":0 "scope":{ "type":"object", "handle":4 } }, "running":false, "success":true, }
[edit] scopes
Returns all the scopes for a frame.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"scopes", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "frameIndex":<frame_index> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number frame_indexa required argument thats indicates which frame to get the scopes from.
Example Request
An example of the request you send:
Content-Length:106 \r\n\r\n { "type":"request", "command":"scopes", "contextId":"xf0.3::6179868", "seq":16, "arguments":{ "frameIndex":0 } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"scopes", "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{ <scope_array> }, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this response came from packet_sequencethe packet sequence number request_sequencethe request sequence number scope_arraythe array of scope objects if any runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:282 \r\n\r\n { "type":"response", "command":"scopes", "contextId":"xf0.3::6179868", "seq":17, "request_seq":16, "body":{ "fromScope":0, "toScope":0, "totalScopes":1, "scopes":[{ "index":0, "frameIndex":0, "scope":{"type":"object","handle":19} }] }, "running":false, "success":true }
[edit] script
Retrieve a single scriptThe request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request" "command":"script", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "includeSource":<include_source>, "url":<script_url> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number include_sourcea required argument that indicates if the source for the requested script should be returned in the response urla required argument that indicates where to get the script from
Example Request
An example of the request you send:
Content-Length:188 \r\n\r\n { "type":"request" "command":"script", "contextId":"xf0.3::2777681", "seq":84, "arguments":{ "includeSource":true, "url":"http://www.mozilla.org/script/1.0/jquery-ui-1.7.2.custom.min.js" } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"script", "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{ "script":<script_object> }, "running":<running>, "success":<success>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number request_sequencethe request sequence number script_objectthe requested script object runningif Crossfire is in a running state successif the request was successful or not Example Response
An example of the response you receive:
Content-Length:19783 \r\n\r\n { "type":"response", "command":"script", "contextId":"xf0.3::2777681", "seq":85, "request_seq":84, "body":{ "script":{ "url":"http://www.mozilla.org/script/1.0/jquery-ui-1.7.2.custom.min.js", "lineOffset":0, "columnOffset":0, "lineCount":19, "type":"top-level", "source":"..." } }, "running":true, "success":true, }
[edit] scripts
Retrieve all known scripts in a context.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"scripts", "contextId":<context_id>, "seq":<packet_sequence>, "arguments":{ "includeSource":<include_source> } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number include_sourcea required argument that indicates if source should be returned for each of the scripts that are returned
Example Request
An example of the request you send:
Content-Length:112 \r\n\r\n { "type":"request", "command":"scripts", "contextId":"xf0.3::3788274", "seq":52, "arguments":{ "includeSource":true } } \r\nThe response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"scripts", "contextId":<context_id>, "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{ "scripts":<script_array> }, "running":<running>, "success":<success>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number request_sequencethe packet request sequence number script_arraythe array of script objects runningif Crossfire is in a running state successif the request was successful or not
Example Response
An example of the response you receive:
Content-Length:382 \r\n\r\n { "type":"response", "command":"scripts", "contextId":"xf0.3::1171142", "seq":32, "request_seq":31, "body":{ "scripts":[ {"url":"http://www.google.ca/","lineOffset":0,"columnOffset":0,"sourceLength":5,"lineCount":40,"type":"top-level"}, {"url":"http://www.google.ca//event/seq/1","lineOffset":0,"columnOffset":0,"sourceLength":3,"lineCount":3,"type":"event"} ] }, "running":true, "success":true, }
[edit] setbreakpoint
Set a breakpoint and return its id.This command has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
The request packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request" "command":"setbreakpoint", "seq":<packet_sequence>, "arguments":{ "location":<location_object>, "attributes":<attributes_object> "type":<type>, } } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number location_objecta required argument that specifies the locale to place them breakpoint in, for example the URL of the script and the line within that script attributes_objectan optional argument that specifies the attributes to be set on the breakpoint, for example enabledorcondition.typean optional argument that specifies the kind of breakpoint to create, if omitted, "line" is assumed
Example Request
An example of the request you send:
Content-Length:210 \r\n\r\n { "type":"request", "command":"setbreakpoint", "seq":42, "arguments":{ "type":"line", "location":{ "line":2, "url":"http:\/\/www.google.ca\/\/event\/seq\/1" }, "attributes":{ "enabled":true "condition":null } } } \r\n
The response packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"response", "command":"setbreakpoint", "seq":<packet_sequence>, "request_seq":<request_sequence>, "body":{ <breakpoint_object> }, "running":<is_running>, "success":<success_status>, }
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number request_sequencethe request sequence number breakpoint_objectthe breakpoint object for the set breakpoint runningif Crossfire is in a running state successif the request was successful or not Example Response
An example of the response you receive:
Content-Length:244 \r\n\r\n { "type":"response", "command":"setbreakpoint", "seq":44, "request_seq":42, "body":{ "breakpoint":{ "handle":1, "type":"line", "location":{ "line":2, "url":"http://www.google.ca//event/seq/1" }, "attributes":{ "enabled":true } } }, "running":true, "success":true }
[edit] suspend
Try to suspend any currently running JavaScript.The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"suspend", "contextId":<context_id>, "seq":<packet_sequence>, } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context this request is targeted for packet_sequencethe packet sequence number
Example Request
An example of the request you send:
Content-Length:77 \r\n { "type":"request", "command":"suspend", "contextId":"xf0.1a::9931113", "seq":5, } \r\n
Example Response
An example of the response you receive:
Content-Length:105 \r\n\r\n { "type":"response", "command":"suspend", "seq":93, "request_seq":92, "running":true, "success":true }
[edit] version
Returns the Crossfire protocol version. This command does not require acontext_idfield.The packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"request", "command":"version", "seq":<packet_sequence> } \r\n
Arguments
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number
Example Request
An example of the request you send:
Content-Length:47 \r\n\r\n { "type":"request" "command":"version", "seq":10 } \r\nExample Response
An example of the response you will receive:
Content-Length:120 \r\n\r\n { "type":"response", "command":"version", "seq":11, "request_seq":10, "body":{"version":"0.3"}, "running":true, "success":true }
[edit] Events
[edit] onBreak
Firebug has suspended ("broken") in a script.This event has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
Content-Length:<content_length> \r\n\r\n { "type":"event", "event":"onBreak", "seq":<packet_sequence>, "contextId":<context_id>, "data":{ "location":<location>, "cause":<cause> } }Event Data
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe id of the context that suspended (broke) packet_sequencethe packet sequence number locationthe location specific attributes for the event causethe cause specific attributes of the event
Example
Content-Length:156 \r\n\r\n { "seq":37, "type":"event", "event":"onBreak", "contextId":"xf0.3::5159616", "data":{ "location":{"url":"http://www.google.ca//event/seq/1","line":2}, "cause":{} } }
[edit] onContextCreated
Fired when a new context is created in Firebug (ex: A new tab was opened and firebug was activated).This event has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
Content-Length:<content_length> \r\n\r\n { "type":"event", "event":"onContextCreated", "seq":<packet_sequence>, "body":{ "url":<url> "contextId":<context_id> }, }Event Data
content_lengththe entire length of the packet content between the curly braces (including the curly braces) packet_sequencethe packet sequence number urlthe URL of the page that has been loaded (activated) context_idthe id of the context that was created
Example
Content-Length:142 \r\n\r\n { "type":"event", "event":"onContextCreated", "seq":5, "body":{ "url":"http://www.mozilla.com/en-US/firefox/central/", "contextId":"xf0.3::6985855" }, }
[edit] onContextDestroyed
Fired when a Firebug has destroyed a context (ex: Deactivate firebug has been pressed on a tab)This event has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
Content-Length:91 \r\n\r\n { "type":"event", "event":"onContextDestroyed", "seq":6, "data":{ "contextId":"xf0.3::2075594" } }Event Data
There is no additional data for this event. The context that has been destroyed is the one specified in the
contextIdbody value.
[edit] onContextLoaded
A new context (page) has been loaded. Typically this event is sent after a new tab is opened.This event has been updated in Crossfire version 0.3a7, please see the migration guide entry for more information.
Content-Length:<content_length> \r\n\r\n { "type":"event", "event":"onContextLoaded", "data":{ "url":<url>, "contextId":<context_id> }, }Event Data
content_lengththe entire length of the packet content between the curly braces (including the curly braces) urlthe URL of the context that was loaded context_idthe id of the context that has been loaded
Example
Content-Length:141 \r\n\r\n { "type":"event", "event":"onContextLoaded", "data":{ "url":"http://www.mozilla.com/en-US/firefox/central/" "contextId":"xf0.3::6985855" }, }
[edit] onContextSelected
Fired when the browser is loaded and a context is switched to without having been loadedThis event has been added in Crossfire version 0.3a7, please see the migration guide entry for more information.
The event packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"event" "event":"onContextSelected", "data":{ "url":<new_url>, "contextId":<new_context_id>, "oldUrl":<url>, "oldContextId":<context_id> }, }
Event Data
content_lengththe entire length of the packet content between the curly braces (including the curly braces) new_urlthe URL of the context that was switched to new_context_idthe Crossfire id of the context that was switched to urlthe URL of the context that was switched from context_idthe Crossfire id of the context that was switched from
Example
Content-Length:181 \r\n\r\n { "type":"event" "event":"onContextSelected", "data":{ "url":"http://www.google.ca/advanced_search?hl=en", "contextId":"xf0.3::9202767", "oldUrl":"http://www.ubuntulinux.org/", "oldContextId":"xf0.3::9202766" }, }
[edit] onError
Fired when an error is written to the console orconsole.error()is used.
Content-Length:471 \r\n\r\n { "type":"event", "event":"onError", "contextId":"xf0.3::8821652", "seq":136, "data":{ "type":"object", "value":{ "message":{"type":"string","value":"foo"}, "href":{"type":"string","value":"http://www.google.ca/"}, "lineNo":{"type":"number","value":0}, "source":{"type":"string","value":""}, "category":{"type":"string","value":"error"}, "context":{"type":"object","handle":24}, "trace":{"type":"undefined"}, "msgId":{"type":"undefined"}, "constructor":{"type":"function","handle":3} } } }Event Data
datathe error information and stack written to the console
[edit] onResume
Fired when a context is resumed (after being suspended)
Content-Length:75 \r\n\r\n { "type":"event", "event":"onResume", "contextId":"xf0.3::8127621", }Event Data
There is no additional event data. The context that has been resumed in the one specified in the
context_idparameter.
[edit] onScript
Fired when a new script is compiled.
Content-Length:<content_length> \r\n\r\n { "type":"event", "event":<event>, "contextId":<context_id>, "seq":<packet_sequence>, "data":{<script_object>} }Event Data
content_lengththe entire length of the packet content between the curly braces (including the curly braces) eventthe name of the event. A complete listing of events that can appear in <event>are available in the Events section.context_idthe id of the context this event came from packet_sequencethe packet sequence number script_objectthe script object that was created
Example
Content-Length:631 \r\n\r\n { "seq":10, "type":"event", "event":"onScript", "contextId":"xf0.3::2531266", "data":{ "script": { "url":"http://www.google.ca/advanced_search?hl=en", "lineOffset":0, "columnOffset":0, "sourceLength":311, "lineCount":311, "compilationType":"top-level" } } }
[edit] onToggleBreakpoint
Fired when a breakpoint is created or removed.This event has been added in Crossfire version 0.3a7, please see the migration guide entry for more information.
The event packet has the following form:
Content-Length:<content_length> \r\n\r\n { "type":"event" "event":"onToggleBreakpoint", "contextId":<context_id> "data":{ "breakpoint":<breakpoint>, "props":<properties> "set":<isset>, }, }
Event Data
content_lengththe entire length of the packet content between the curly braces (including the curly braces) context_idthe Crossfire id of the context that sent the event breakpointthe breakpoint object that was toggled propertiesthe additional listing of properties that can accompany the event issetif the breakpoint has been concretely set in a script
Example
Content-Length:255 \r\n\r\n { "type":"event", "event":"onToggleBreakpoint", "contextId":"xf0.3::5524167", "seq":14, "data":{ "breakpoint":{ "handle":3, "type":"line", "location":{"line":2,"url":"http://www.google.ca//event/seq/1"}, "attributes":{"enabled":true,"condition":null} }, "set":true } }
[edit] Console Tool Events
The console tools will only send any of the following events if they are enabled. By default the console tools are not enabled.
Clients can automatically turn on the console tool via a modified handshake. For more information about the console tool and how to enable and use it see the Console Tool API documentation.
[edit] onConsoleDebug
Fired when debug information is written to the console orconsole.debug()is used.
Content-Length:198 \r\n tool:console \r\n\r\n { "type":"event", "event":"onConsoleDebug", "contextId":"xf0.3::8821652", "seq":127, "data":{ "type":"object", "value":{ "0":{"type":"string","value":"foo"}, "constructor":{"type":"function","handle":21} } } }Event Data
datathe debug information written to the console
[edit] onConsoleInfo
Fired when information is written to the console orconsole.info()is used.
Content-Length:197 \r\n tool:console \r\n\r\n { "type":"event", "event":"onConsoleInfo", "contextId":"xf0.3::8821652", "seq":144, "data":{ "type":"object", "value":{ "0":{"type":"string","value":"foo"}, "constructor":{"type":"function","handle":21} } } }Event Data
datathe log information written to the console
[edit] onConsoleLog
Fired when a log entry is written to the console orconsole.log()is used.
Content-Length:196 \r\n tool:console \r\n\r\n { "type":"event", "event":"onConsoleLog", "contextId":"xf0.3::8821652", "seq":118, "data":{ "type":"object", "value":{ "0":{"type":"string","value":"foo"}, "constructor":{"type":"function","handle":21} } } }Event Data
datathe log information written to the console
[edit] onConsoleWarn
Fired when a warning is written to the console orconsole.warn()is used.
Content-Length:197 \r\n tool:console \r\n\r\n { "type":"event", "event":"onConsoleWarn", "contextId":"xf0.3::8821652", "seq":152, "data":{ "type":"object", "value":{ "0":{"type":"string","value":"foo"}, "constructor":{"type":"function","handle":21} } } }Event Data
datathe warning written to the console
[edit] DOM Tool Events
The DOM tools alert clients to changes in the DOM. By default the DOM tools are not enabled.
Clients can automatically turn on the DOM tool via a modified handshake. For more information about the DOM tool and how to enable and use it see the DOM Tool API documentation.
[edit] onDomMutate
Content-Length:87 \r\n tool:dom \r\n\r\n { "type":"event", "event":"onDomMutate", "contextId":"xf0.3::8821652", "seq":50, "data":{} }Event Data
[edit] Inspect Tool Events
The Inspector tools notify clients of element inspections in Firebug. By default the Inspector tool is not enabled.
Clients can automatically turn on the inspector tool via a modified handshake. For more information about the inspector tool and how to enable and use it see the Inspector Tool API documentation.
[edit] onInspectNode
Fired when Firebug is in 'Inspect Mode' and DOM elements are inspected. The event contains the path to the DOM element being inspected at the time the even was fired.
Content-Length:186 \r\n\r\n { "type":"event", "event":"onInspectNode", "contextId":"xf0.3::7640266", "seq":66, "data":{ "node":"/html[1]/body[1]/div[1]/div[4]/div[1]/div[1]/div[2]/div[2]/div[7]/div[1]/span[2]/span[1]" } }Event Data
nodethe complete unique path to the element being inspected in the DOM.
[edit] Net Tool Events
The Net tools notify users of information changes in the Net panel. By default the Net tools are not enabled.
Clients can automatically turn on the net tool via a modified handshake. For more information about the net tool and how to enable and use it see the Net Tool API documentation.
[edit] Trace Tool Events
The Trace tool allows additional debug information about what the Crossfire server is doing at any given time to be sent to the remote client. By default the Trace tool is not enabled.
Clients can automatically turn on the trace tool via a modified handshake. For more information about the trace tool and how to enable and use it see the Trace Tool API documentation.