openDevTools method
Opens a DevTools window for the target.
targetId This can be the page or tab target ID.
panelId 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: The targetId of DevTools page target.
Implementation
Future<TargetID> openDevTools(TargetID targetId, {String? panelId}) async {
var result = await _client.send('Target.openDevTools', {
'targetId': targetId,
if (panelId != null) 'panelId': panelId,
});
return TargetID.fromJson(result['targetId'] as String);
}