Central data types and how they work:
A "runtime" represents a document context in which threads execute. There is a one-to-one mapping between runtimes and HTML documents.
A "thread" represents a thread of execution in a runtime. A "parent" thread can be preempted by another "child" thread in order to respond to a priority event; the parent thread will not run again until the child thread has finished.
A "script" is a pair (id, source code) where the id is globally unique and the source code is Unicode text.
An "object" is represented by a globally unique ID that is assigned by the debugger.
Globally unique means unique within a running Opera session; that is from starting Opera to stopping it.
The windowID is shared across scope. Notably, it's the same as in the console logger and window manager INTERNAL: The value is from Window::id
AddBreakpoint
command AddBreakpoint( )
returns ( )
= 6;
AddEventBreakpoint
command AddEventBreakpoint( )
returns ( )
= 38;
AddEventHandler
Add an event handler. This will generate a OnHandleEvent event every time the XML event defined by the pair (namespace, eventType) reaches the object defined by objectID in the capturing phase. XML events are defined in http://www.w3.org/TR/xml-events
command AddEventHandler( )
returns ( )
= 8;
Break
command Break( )
returns ( )
= 12;
ContinueThread
command ContinueThread( )
returns ( )
= 2;
CssGetAllStylesheets
command CssGetAllStylesheets( )
returns ( )
= 23;
CssGetIndexMap
command CssGetIndexMap( )
returns ( )
= 22;
CssGetStyleDeclarations
command CssGetStyleDeclarations( )
returns ( )
= 25;
CssGetStylesheet
command CssGetStylesheet( )
returns ( )
= 24;
Eval
command Eval( )
returns ( )
= 3;
ExamineObjects
command ExamineObjects( )
returns ( )
= 4;
GetBacktrace
command GetBacktrace( )
returns ( )
= 11;
GetSelectedObject
command GetSelectedObject( )
returns ( )
= 26;
InspectDom
command InspectDom( )
returns ( )
= 13;
ListRuntimes
command ListRuntimes( )
returns ( )
= 1;
ReleaseObjects
Release protected ECMAScript objects. This will just make them garbage collectible. Released objects are not necessarily freed immediately.
Calling ReleaseObjects with an empty list causes all objects to be released. Otherwise, only the specified objects will be released. Attempting to release a non-existent object has no effect, and will fail silently.
Releasing objects invalidates associated object IDs immediately.
command ReleaseObjects( )
returns ( )
= 29;
RemoveBreakpoint
command RemoveBreakpoint( )
returns ( )
= 7;
RemoveEventHandler
command RemoveEventHandler( )
returns ( )
= 9;
SearchDom
Search the DOM of a document, using either plain text, regexp, xpath or CSS selectors.
For plain text and regular expression searches, tag names, attribute names, attribute values and text content is searched through. Regular expressions searches use the same backend as the RegExp object in ECMAScript, and therefore use the same syntax and semantics.
CSS selector or XPath searches work like their DOM counterparts (document.querySelector, and document.evaluate). For more information, see:
Whenever a matching node is found, that node is included in the command response, and marked as a search hit. The parent chain is also included for each hit; however, no parent is included twice (nor is any 'hit' included twice).
Added in version 6.5
command SearchDom( )
returns ( )
= 42;
SetConfiguration
command SetConfiguration( )
returns ( )
= 10;
SetFunctionFilter
Specify which objects to get OnFunctionCallStarting and OnFunctionCallCompleted events for. If a function is called on an object with a matching class name, the events will be reported.
The default filter is empty, meaning no function calls will be reported.
Added in version 6.4
command SetFunctionFilter( )
returns ( )
= 39;
SetPropertyFilter
Sets a new property filter which may hide some properties when examining an object. This is useful for excluding many 'uninteresting' properties found on built-in prototypes.
Calling this will overwrite the previous filter.
command SetPropertyFilter( )
returns ( )
= 30;
SpotlightObject
command SpotlightObject( )
returns ( )
= 5;
SpotlightObjects
command SpotlightObjects( )
returns ( )
= 27;
OnConsoleLog
This event occurs when the script calls one of these functions:
1. console.log 2. console.debug 3. console.info 4. console.warn 5. console.error 6. console.assert 7. console.dir 8. console.dirxml 9. console.group 10. console.groupCollapsed 11. console.groupEnded 12. console.count 13. console.tableAll the functions behave the same way; they accept any number of arguments, and sends them to the client.
The console.assert function is a special case, which outputs nothing if the first argument evaluates to true. Otherwise, it behaves like the other functions and sends its arguments to the client (including the first argument which triggered the assertion). If the assertion fails, it also throws an exception.
event OnConsoleLog returns ( )
= 32;
OnConsoleProfile
Occurs when console.profile is called in a script. Note that profiling is not yet supported. This event is just included to let the client know that the function has been called.
event OnConsoleProfile returns ( )
= 36;
OnConsoleProfileEnd
Occurs when console.profileEdd is called in a script. Note that profiling is not yet supported. This event is just included to let the client know that the function has been called.
event OnConsoleProfileEnd returns ( )
= 37;
OnConsoleTime
Occurs when console.time is called in the script. When this event occurs, Opera will start a timer which can be referred to by the specified title. The timer can later be stopped with console.timeEnd, which will calculate the elapsed time between the two calls.
event OnConsoleTime returns ( )
= 33;
OnConsoleTimeEnd
Occurs when console.timeEnd is called in the script. The message contains the elapsed time between the corresponding call to console.time (see OnConsoleTime).
event OnConsoleTimeEnd returns ( )
= 34;
OnConsoleTrace
Occurs when console.trace is called in the script. Sends the stack trace at the position where the call was made.
event OnConsoleTrace returns ( )
= 35;
OnFunctionCallCompleted
Occurs when a function call has completed.
event OnFunctionCallCompleted returns ( )
= 41;
OnFunctionCallStarting
Occurs when a function call is about to be performed.
event OnFunctionCallStarting returns ( )
= 40;
OnHandleEvent
This event is issued for XML events on the host, if a corresponding AddEventHandler has been issued earlier by the client.
event OnHandleEvent returns ( )
= 20;
OnNewScript
event OnNewScript returns ( )
= 16;
OnObjectSelected
Some hosts send this event to indicate that an object was selected for debugging, e.g., if the debugger was started by right-clicking an element and clicking "inspect" in the context menu, this event will be sent right after startup. A client may safely choose to ignore this event.
event OnObjectSelected returns ( )
= 21;
OnParseError
event OnParseError returns ( )
= 28;
OnReadyStateChanged
Sent when the ready state of a document is changed. The possible states are:
1. DOMContentLoaded: When the DOM (not inline elements) is loaded 2. Loaded: After all onload-handlers have finishedevent OnReadyStateChanged returns ( )
= 31;
OnRuntimeStarted
event OnRuntimeStarted returns ( )
= 14;
OnRuntimeStopped
event OnRuntimeStopped returns ( )
= 15;
OnThreadFinished
event OnThreadFinished returns ( )
= 18;
OnThreadMigrated
Occurs when a thread migrates from one runtime to another runtime. This can happen if 'document.write' replaces the current runtime.
Added in version 6.9
event OnThreadMigrated returns ( )
= 43;
OnThreadStarted
event OnThreadStarted returns ( )
= 17;
OnThreadStoppedAt
event OnThreadStoppedAt returns ( )
= 19;