← Back to Target domain
Target.openDevTools
Opens a DevTools window for the target.
Domain: Target
experimental
Parameters
| Name | Type | Description |
targetId | TargetID | This can be the page or tab target ID. |
panelId (optional) | string | The id of the panel we want DevTools to open initially. Currently
supported panels are elements, console, network, sources, resources,
timeline, chrome-recorder, heap-profiler, lighthouse, and security. |
Returns
| Name | Type | Description |
targetId | TargetID | The targetId of DevTools page target. |
Example Request
{
"id": 1,
"method": "Target.openDevTools",
"params": {
"targetId": "TARGET_ID_HERE"
}
}
Example Response
{
"id": 1,
"result": {
"targetId": "TARGET_NEW_001"
}
}
Usage in Node.js
const result = await send('Target.openDevTools', {"targetId": "TARGET_ID_HERE"});
console.log(result);
// {"targetId": "TARGET_NEW_001"}