stable (1.2) stable RC (1.3) latest (tip-of-tree) v8-inspector (node) Home
Domains
Accessibility Animation ApplicationCache Audits Browser CSS CacheStorage Console DOM DOMDebugger DOMSnapshot DOMStorage Database Debugger DeviceOrientation Emulation HeadlessExperimental HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Performance Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

Target Domain

Supports additional targets discovery and allows to attach to them.

Methods

Target.activateTarget

Activates (focuses) the target.

Parameters
targetId
TargetID

Target.attachToTarget

Attaches to the target with given id.

Parameters
targetId
TargetID
Return object
sessionId
SessionID Id assigned to the session.

Target.closeTarget

Closes the target. If the target is a page that gets closed too.

Parameters
targetId
TargetID
Return object
success
boolean

Target.createBrowserContext

Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. Experimental

Return object
browserContextId
BrowserContextID The id of the context created.

Target.createTarget

Creates a new page.

Parameters
url
string The initial URL the page will be navigated to.
width
integer Frame width in DIP (headless chrome only).
height
integer Frame height in DIP (headless chrome only).
browserContextId
BrowserContextID The browser context to create the page in (headless chrome only).
enableBeginFrameControl
boolean Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default). Experimental
Return object
targetId
TargetID The id of the page opened.

Target.detachFromTarget

Detaches session with given id.

Parameters
sessionId
SessionID Session to detach.
targetId
TargetID Deprecated. Deprecated

Target.disposeBrowserContext

Deletes a BrowserContext, will fail of any open page uses it. Experimental

Parameters
browserContextId
BrowserContextID
Return object
success
boolean

Target.getTargetInfo

Returns information about a target. Experimental

Parameters
targetId
TargetID
Return object
targetInfo
TargetInfo

Target.getTargets

Retrieves a list of available targets.

Return object
targetInfos
array [ TargetInfo ] The list of targets.

Target.sendMessageToTarget

Sends protocol message over session with given id.

Parameters
message
string
sessionId
SessionID Identifier of the session.
targetId
TargetID Deprecated. Deprecated

Target.setAttachToFrames

Experimental

Parameters
value
boolean Whether to attach to frames.

Target.setAutoAttach

Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. Experimental

Parameters
autoAttach
boolean Whether to auto-attach to related targets.
waitForDebuggerOnStart
boolean Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.

Target.setDiscoverTargets

Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.

Parameters
discover
boolean Whether to discover available targets.

Target.setRemoteLocations

Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`. Experimental

Parameters
locations
array [ RemoteLocation ] List of remote locations.

Events

Target.attachedToTarget

Issued when attached to target because of auto-attach or `attachToTarget` command. Experimental

Parameters
sessionId
SessionID Identifier assigned to the session used to send/receive messages.
targetInfo
TargetInfo
waitingForDebugger
boolean

Target.detachedFromTarget

Issued when detached from target for any reason (including `detachFromTarget` command). Can be issued multiple times per target if multiple sessions have been attached to it. Experimental

Parameters
sessionId
SessionID Detached session identifier.
targetId
TargetID Deprecated. Deprecated

Target.receivedMessageFromTarget

Notifies about a new protocol message received from the session (as reported in `attachedToTarget` event).

Parameters
sessionId
SessionID Identifier of a session which sends a message.
message
string
targetId
TargetID Deprecated. Deprecated

Target.targetCreated

Issued when a possible inspection target is created.

Parameters
targetInfo
TargetInfo

Target.targetDestroyed

Issued when a target is destroyed.

Parameters
targetId
TargetID

Target.targetInfoChanged

Issued when some information about a target has changed. This only happens between `targetCreated` and `targetDestroyed`.

Parameters
targetInfo
TargetInfo

Types

TargetID

Type: string

SessionID

Unique identifier of attached debugging session.

Type: string

BrowserContextID

Experimental

Type: string

TargetInfo

Type: object

Properties
targetId
TargetID
type
string
title
string
url
string
attached
boolean Whether the target has an attached client.
openerId
TargetID Opener target Id

RemoteLocation

Experimental

Type: object

Properties
host
string
port
integer