Namespace CrossfireModule
Firebug Module for Crossfire. This module acts as a controller
between Firebug and the remote debug connection. It is responsible for
opening a connection to the remote debug host and dispatching any
command requests to the FirebugCommandAdaptor (@see FirebugCommandAdaptor.js).
This module also adds context and debugger listeners and sends the
appropriate events to the remote host.
Defined in: crossfire.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
CrossfireModule.connect(host, port)
attempt to connect to remote host/port
|
| <static> |
CrossfireModule.copyFrame(frame, ctx, copyStack)
Make a copy of a frame since the jsdIStackFrame's are ephemeral,
but our protocol is asynchronous so the original frame object may
be gone by the time the remote host requests it.
|
| <static> |
CrossfireModule.destroyContext(context)
Remove the context from our list of contexts.
|
| <static> |
CrossfireModule.disconnect()
disconnect the current connection.
|
| <static> |
CrossfireModule.handleEvent(
context, send events generated by Firebug to the remote host.
|
| <static> |
CrossfireModule.handleRequest(request)
Listener function called by the transport when a request is
received.
|
| <static> |
CrossfireModule.initContext(context)
Add the new context to our list of contexts.
|
| <static> |
CrossfireModule.initialize()
extends Firebug.Module
|
| <static> |
CrossfireModule.listContexts()
listContexts method is called in response to a
listcontexts command. |
| <static> |
CrossfireModule.listen(host, port)
listen for incoming connections on a port.
|
| <static> |
CrossfireModule.loadedContext(context)
Create a new command adaptor for the context when it is loaded.
|
| <static> |
CrossfireModule.logFormatted(context, objects, className, sourceLink)
logFormatted listener.
|
| <static> |
CrossfireModule.onConnectionStatusChanged(status)
called when the status of the transport's connection changes.
|
| <static> |
CrossfireModule.onInspectNode(context, node)
Send
onInspectNode event. |
| <static> |
CrossfireModule.onResume(context)
Send
onResume event and set status 'running' to true. |
| <static> |
CrossfireModule.onStartDebugging(context)
Copy the current frame (in case remote host requests it)
and send
onBreak event. |
| <static> |
CrossfireModule.onToggleBreakpoint(context, url, lineNo, isSet, props)
Send
onToggleBreakpoint event. |
| <static> |
CrossfireModule.onToggleErrorBreakpoint(context, url, lineNo, isSet, props)
Send
onToggleBreakpoint event. |
| <static> |
CrossfireModule.setConnected(isConnected)
Update Crossfire connection status icon.
|
| <static> |
CrossfireModule.setRunning(isRunning)
Update Crossfire running status.
|
Method Detail
<static>
CrossfireModule.connect(host, port)
attempt to connect to remote host/port
- Parameters:
- {String} host
- the host name.
- {Number} port
- the port number.
<static>
CrossfireModule.copyFrame(frame, ctx, copyStack)
Make a copy of a frame since the jsdIStackFrame's are ephemeral,
but our protocol is asynchronous so the original frame object may
be gone by the time the remote host requests it.
- Parameters:
- frame
- ctx
- copyStack
<static>
CrossfireModule.destroyContext(context)
Remove the context from our list of contexts.
- Parameters:
- context
<static>
CrossfireModule.disconnect()
disconnect the current connection.
<static>
CrossfireModule.handleEvent(
context, eventName, arguments)
send events generated by Firebug to the remote host.
- Parameters:
-
context - context of this event.
-
{String}
eventName - name of the event
- {Object} arguments
- any arguments after the first two will be passed to the event handler.
<static>
CrossfireModule.handleRequest(request)
Listener function called by the transport when a request is
received.
Looks up the context by the request object's
context_id
property and calls the requested command on that context's
command adaptor.
- Parameters:
- request
<static>
CrossfireModule.initContext(context)
Add the new context to our list of contexts.
- Parameters:
- context
<static>
CrossfireModule.initialize()
extends Firebug.Module
<static>
CrossfireModule.listContexts()
listContexts method is called in response to a
listcontexts command.
This method returns all the context id's that we know about.
This is the only method that returns a protocol command response
that is not implemented in FirebugCommandAdaptor, because it is
not specific to one context.
<static>
CrossfireModule.listen(host, port)
listen for incoming connections on a port.
- Parameters:
- {String} host
- the host name.
- {Number} port
- the port number to listen on.
<static>
CrossfireModule.loadedContext(context)
Create a new command adaptor for the context when it is loaded. Send "onContextCreated" event.
- Parameters:
- context
<static>
CrossfireModule.logFormatted(context, objects, className, sourceLink)
logFormatted listener.
Generates event packets based on the className (log,debug,info,warn,error).
The object or message logged is contained in the packet's
data property.
The generated event names are:
onConsoleLog,
onConsoleDebug,
onConsoleInfo,
onConsoleWarn,
onConsoleError
- Parameters:
- context
- objects
- className
- sourceLink
<static>
CrossfireModule.onConnectionStatusChanged(status)
called when the status of the transport's connection changes.
- Parameters:
- {String} status
<static>
CrossfireModule.onInspectNode(context, node)
Send
onInspectNode event.
- Parameters:
- context
- node
<static>
CrossfireModule.onResume(context)
Send
onResume event and set status 'running' to true.
- Parameters:
- context
<static>
CrossfireModule.onStartDebugging(context)
Copy the current frame (in case remote host requests it)
and send
onBreak event.
- Parameters:
- context
<static>
CrossfireModule.onToggleBreakpoint(context, url, lineNo, isSet, props)
Send
onToggleBreakpoint event.
- Parameters:
- context
- url
- lineNo
- isSet
- props
<static>
CrossfireModule.onToggleErrorBreakpoint(context, url, lineNo, isSet, props)
Send
onToggleBreakpoint event.
- Parameters:
- context
- url
- lineNo
- isSet
- props
<static>
CrossfireModule.setConnected(isConnected)
Update Crossfire connection status icon.
- Parameters:
- isConnected
<static>
CrossfireModule.setRunning(isRunning)
Update Crossfire running status.
- Parameters:
- isRunning