Console Domain
The Console domain defines methods for accessing messages reported to the console.
All commands and events in this domain must include a sessionId
.
Methods
Events
Types
Methods
Console.findMessages #
Find all messages in the recording. Does not return until the recording is
fully processed. Before returning, newMessage
events will be
emitted for every console message in the recording.
Return Object
- overflow
-
boolean
Set if there were too many messages and not all were returned.
Console.findMessagesInRange #
Find all messages in one area of a recording. Useful if finding all messages in the recording overflowed.
NOTE: This command will fail if the focus window changes while it is running.
parameters
- range
-
Recording.PointRange
Subrange of the recording to find messages within.
Return Object
- messages
-
array[ Message ]
Messages within the specified range.
- overflow
-
boolean
Whether there were too many messages and not all were returned.
Events
Types
Console.Message #
Contents of a console message.
Type: object
properties
- source
-
MessageSource
Source of the message.
- level
-
MessageLevel
Severity level of the message.
- text
-
string
Any text associated with the message.
- url
-
string
Any URL associated with the message.
- sourceId
-
Debugger.SourceId
Any source associated with the message.
- line
-
integer
Any 1-indexed line number associated with the message.
- column
-
integer
Any 0-indexed column number associated with the message.
- point
-
Debugger.PointDescription
Point associated with the message. For messages added due to uncaught exceptions this is the point at which the exception was thrown. For other types of messages it is the point where the message was added.
- pauseId
-
Pause.PauseId
Pause ID associated with the message arguments and stack.
- argumentValues
-
array[ Pause.Value ]
Any arguments to the message.
- stack
-
Pause.CallStack
Stack contents for the pause, omitted if there are no frames on the stack at the message's point.
- data
-
Pause.PauseData
Data describing the message arguments and frames on the stack.
Console.MessageLevel #
Severity level of a message.
info
, trace
, warning
, error
, assert
, timeEnd
Type: string
Console.MessageSource #
Possible sources from which a message can originate.
PageError
, ConsoleAPI
, UnknownMessageError
Type: string